-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
54 lines (39 loc) · 2 KB
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
from telegram import Update
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: reply text generated by LLM here
await update.message.reply_text(f'Hello {update.effective_user.first_name}')
async def connect(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: link to connect wallet
# TODO: reply text generated by LLM here
await update.message.reply_text(f'Under construction {update.effective_user.first_name}')
async def do(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: reply text generated by LLM here
await update.message.reply_text(f'Under construction {update.effective_user.first_name}')
async def dont(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: reply text generated by LLM here
await update.message.reply_text(f'Under construction {update.effective_user.first_name}')
async def bye(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: reply text generated by LLM here
await update.message.reply_text(f'Under construction {update.effective_user.first_name}')
async def help_text(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
# TODO: reply text generated by LLM here
await update.message.reply_text('\n'.join((
'commands overview:',
'',
'/help - this',
'/hello - greetings',
'/connect - connect your wallet',
'/do - request stuff',
'/dont - second placeholder',
'/bye - good bye and see you again!',
)))
app = ApplicationBuilder().token(os.environ["BOT_TOKEN"]).build()
app.add_handler(CommandHandler("help", help_text))
app.add_handler(CommandHandler("hello", hello))
app.add_handler(CommandHandler("connect", connect))
app.add_handler(CommandHandler("do", do_stuff))
app.add_handler(CommandHandler("dont", do_not_do_stuff))
app.add_handler(CommandHandler("bye", bye))
app.run_polling()