Giter Club home page Giter Club logo

pyrogrambot's Introduction

Bot ๐Ÿ”ฅ๐Ÿค–

A Telegram Bot [still WIP, not stable] based on Pyrogram

This was an attempt to learn bot development using Pyrogram. I had made several mistakes (or, bad design decisions), in the creation of this bot. So, โœŒ๏ธ please do not judge theis codes.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING for more details.

installing

The Easy Way

Deploy

ENVironment VARiables

Mandatory Environment Variables

  • TG_BOT_TOKEN_BF_HER: Create a bot using @BotFather, and get the Telegram API token.

  • APP_ID

  • API_HASH: Get these two values from my.telegram.org/apps.

    • N.B.: if Telegram is blocked by your ISP, try our Telegram bot to get the IDs.

Optional Environment Variables

  • ENV: set this to ANYTHING if you want to use ENVIRON mode.

  • COMMAND_HAND_LER: the default value is /, which is the recommended value. Change this only if you know what you are doing.

  • TMP_DOWNLOAD_DIRECTORY: the path (as a string) to store the temporary files, which are used by some of the plugins.

  • DATABASE_URL: if you are using Heroku, this value is automatically filled by the Postgres Plugin. if you are not using Heroku, Read the guide on how to Install Database?, in the Wiki. [ to be deprecated ]

  • TELEGRAM_URL: create a Telegram Channel / Super Group, with you robot as administrator, and add the channel id as an integer in this variable.

  • G_DRIVE_CLIENT_ID: check the Telegram Channel for Instructions on Setting up Google Drive.

  • G_DRIVE_CLIENT_SECRET: check the Telegram Channel for Instructions on Setting up Google Drive.

  • OWNER_ID: this is not used currently, and might be used in the future.

  • SUDO_USERS: The Telegram user_ids who should be allowed to use the sensitive features of the robot.

  • TG_IRU_S_M_ID: this is used for the sretlif plugins.

  • WARN_DATA_ID: this is used for the warns plugins.

  • WARN_SETTINGS_ID: this is used for the warns plugins.

  • A_PIN_MESSAGE_ID: this is used for the antichannelpin plugins.

  • USE_TG_BOT_APP_ID: this is used for the google search plugin. you can get it by sending /getapi to @useTGBot

Credits, and Thanks to

pyrogrambot's People

Contributors

alberteinsteintg avatar arunpt avatar delivrance avatar iiiiii1wepfj avatar jack-of-tg avatar justinthoms avatar lntechnical2 avatar mrvishal2k2 avatar muhammedfurkan avatar naytseyd avatar nitin1818 avatar nmr97007 avatar nuhmanpk avatar paulsonoflars avatar pr0fess0r-99 avatar rking32 avatar shamilhabeebnelli avatar spechide avatar subinps avatar sunda001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyrogrambot's Issues

pin message bug

It is not possible to disable notification with current implementation

filters not working

2020-11-22 22:29:33,761 - pyrogram.dispatcher - ERROR - '-id'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py", line 208, in handler_worker
await handler.callback(self.client, *args)
File "/root/PyroGramBot/pyrobot/plugins/tlifers/save.py", line 98, in save_filter
client.filterstore[str(chat_id)][filter_kw] = fm_id
KeyError: '-id'

Heroku environment configuration error!

An error was encountered when contacting the add-on partner to create heroku-postgresql:hobby-dev: Available versions are 9.6, 10, 11, 12 (the default is 12)

error with TG_IRU_S_M_ID

i get this error

2021-01-14 10:44:39,726 - pyrogram.dispatcher - ERROR - '-1001359198141'

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyrogram/dispatcher.py", line 208, in handler_worker
await handler.callback(self.client, *args)
File "/root/aaaaa/pyrobot/plugins/tlifers/save.py", line 98, in save_filter
client.filterstore[str(chat_id)][filter_kw] = fm_id
KeyError: '-1001359198141'
after i add the message id to TG_IRU_S_M_ID

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.