Code Monkey home page Code Monkey logo

terminalbot's Introduction

TerminalBot

A Telegram Bot based on Pyrogram

installing

The Easy Way

Deploy

The Legacy Way

Simply clone the repository and run the main file:

git clone https://github.com/hackelite01/TerminalBot.git
cd TerminalBot
virtualenv -p /usr/bin/python3 venv
. ./venv/bin/activate
pip install -r requirements.txt
# <Create config.py with variables as given below>
python3 -m termbot

Getting config.py values

An example config.py file could be:

Not All of the variables are mandatory

The Bot should work by setting only these variables

from termbot.sample_config import Config

class Development(Config):
  APP_ID = 6
  API_HASH = "eb06d4abfb49dc3eeb1aeb98ae0f581e"
  TG_BOT_TOKEN = "123456789:eb98ae0f7-Gm_6d4abfb49dc_9dc3eBaEBa"
  AUTH_USERS = [
    997887920
  ]
  • Only four of the configuration / environment variables are mandatory.
  • This is because of pyrogram.errors.API_ID_PUBLISHED_FLOOD
    • APP_ID: You can get this value from https://my.telegram.org
    • API_HASH: You can get this value from https://my.telegram.org
    • TG_BOT_TOKEN: You can create a bot using @BotFather
    • AUTH_USERS: space sperated IDs of users who are allowed to use the bot
    • TG_UPDATE_WORKERS_COUNT: Number of workers to use. 1 is the recommended amount see for yourself what works best!
  • The bot should work without setting the non-mandatory environment variables.
  • Please report any issues to the support group: HackElite

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.