Code Monkey home page Code Monkey logo

the-tg-bot's Introduction

The-TG-Bot

LOGO

Disclaimer

///
    Your Telegram account may get banned.
    I am not responsible for any improper use of this bot
    This bot is intended for the purpose of having fun with memes,
    as well as efficiently managing groups.
    You ended up spamming groups, getting reported left and right,
    and you ended up in a Finale Battle with Telegram and at the end
    Telegram Team deleted your account?
    And after that, you pointed your fingers at us
    for getting your acoount deleted?
    I will be rolling on the floor laughing at you.
///

Requirements

  • openssl
pkg install openssl
  • git
pkg install git
  • python
pkg install python
  • telethon
pip install telethon
  • virtualenv
pip install virtualenv

Connecting to your Telegram Account

git clone https://github.com/justaprudev/The-TG-Bot
cd The-TG-Bot
python3 -m session
  • Run the above code in terminal
  • Enter APP ID, API HASH and phone number conntected to your telegram account
  • Enter login code and/or password
  • Copy the session and continue to installation

Installing

The Easy Way

Deploy

  • Hit the "Deploy to Heroku" button and enter APP ID, API HASH and phone number conntected to your telegram account
  • Enter the session copied while connecting your telegram account
  • Click on the "Deploy" button on the next page
  • After the process is completed, click on "View app"
  • Now click on the "Resources" tab
  • Then click on the edit/pencil icon
  • Finally toggle the switch and hit confirm
  • Your bot is now up and running!
  • Send .alive in any chat to test it

The Legacy Way

  • Enter APP ID, API HASH, SESSION in production.py
  • Run the code given below in terminal
  • After the process is completed, try running .alive on telegram
git clone https://github.com/justaprudev/The-TG-Bot
cd The-TG-Bot
virtualenv -p /usr/bin/python3 venv
. ./venv/bin/activate
pip install -r requirements.txt
python3 -m thetgbot

Read the docs

Here are the most useful "global" variables that can be used on any module you create:

  • ENV: A global object which allows access to enviroment variables defined in env.py
  • client: A modified version of the telegram client.
  • client.storage: A global storage object for the current session.
  • events: A simple function that returns a events.NewMessage object.
  • progress: Generic progress callback for both uploads and downloads.
  • time_formatter: Input time in milliseconds, to get beautified time, as string.
  • humanbytes: Input size in bytes, outputs in a human readable format.
  • You can learn alot just by reading the telethon documentory
  • Here is a simple module that adds " world" to the message if you send ".hello".
@client.on(events("hello"))
async def handler(event):
	await event.edit(event.text[1:] + " world.")
  • Enjoy creating your own modules :P

Credits

the-tg-bot's People

Contributors

thepriyamkalra avatar user838492843 avatar techy05 avatar authoritydmc avatar hydraknight avatar vinaysanga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.