forked from HDCodePractice/EnglishHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
23 lines (18 loc) · 628 Bytes
/
Copy pathbot.py
File metadata and controls
23 lines (18 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from telegram.ext import Updater, dispatcher
from config import ENV
from config import CONFIG
if __name__ == '__main__':
updater = Updater(token=ENV.BOT_TOKEN,use_context=True)
dispatcher = updater.dispatcher
me = updater.bot.get_me()
CONFIG['ID'] = me.id
CONFIG['Username'] = '@' + me.username
print(f"Starting... ID: {str(CONFIG['ID'])} , Username: {CONFIG['Username']}")
commands = []
from cmdproc import worddict
commands.append(worddict.add_dispatcher(dispatcher))
updater.start_polling()
print('Started...')
updater.idle()
print('Stopping...')
print('Stopped.')