Add basic codebase structure

This commit is contained in:
Ceda EI 2021-06-20 18:07:27 +05:30
parent b6bf47ba4b
commit 22d1c0b01d
2 changed files with 36 additions and 0 deletions

35
bot.py Executable file
View File

@ -0,0 +1,35 @@
#!/usr/bin/env python
from telegram.ext import Updater, CommandHandler, MessageHandler, filters
import config
def on_start(upd, ctx):
pass
def on_img_received(upd, ctx):
pass
def on_finish(upd, ctx):
pass
def on_cancel(upd, ctx):
pass
updater = Updater(token=config.API_KEY, use_context=True)
dispatcher = updater.dispatcher
dispatcher.add_handler(CommandHandler("start", on_start))
dispatcher.add_handler(MessageHandler(filters.Filters.photo, on_img_received))
dispatcher.add_handler(CommandHandler("finish", on_finish))
dispatcher.add_handler(CommandHandler("cancel", on_cancel))
def main():
"Main Function"
updater.start_polling()
if __name__ == "__main__":
main()

1
sample.config.py Normal file
View File

@ -0,0 +1 @@
API_KEY = "NNNNNNNNNN:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"