all repos — gif-escarbot @ 2ff3f843b8dc2f033f84613e7da3630e2e43a627

Earthbound Café's custom delivery bot with other cool utilities built-in.

main.py (view raw)

 1from telegram.ext import MessageHandler, ApplicationBuilder, filters
 2from telegram import Update
 3from Config import TOKEN
 4from Replacer import replace
 5from Forwarder import forward, admin_forward
 6
 7if __name__ == "__main__":
 8    application = ApplicationBuilder().token(TOKEN).build()
 9    application.add_handler(MessageHandler(filters.ChatType.CHANNEL, forward))
10    application.add_handler(MessageHandler(filters.ChatType.PRIVATE, admin_forward))
11    application.add_handler(MessageHandler(filters.CHAT & ~filters.COMMAND, replace))
12    application.run_polling(allowed_updates=Update.MESSAGE)