Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from telegram.ext import Updater, CommandHandler
|
2 |
+
|
3 |
+
# Telegram Bot Token from BotFather
|
4 |
+
TOKEN = '7322594950:AAFS4FOOYCdDnJy6VZUM4-6T86_mA18pxjQ '
|
5 |
+
|
6 |
+
def start(update, context):
|
7 |
+
update.message.reply_text('Welcome to the SANTIM Bot!')
|
8 |
+
|
9 |
+
def distribute(update, context):
|
10 |
+
# Token distribution logic here
|
11 |
+
update.message.reply_text('Your token has been sent!')
|
12 |
+
|
13 |
+
def main():
|
14 |
+
updater = Updater(TOKEN, use_context=True)
|
15 |
+
dp = updater.dispatcher
|
16 |
+
|
17 |
+
dp.add_handler(CommandHandler("start", start))
|
18 |
+
dp.add_handler(CommandHandler("distribute", distribute))
|
19 |
+
|
20 |
+
updater.start_polling()
|
21 |
+
updater.idle()
|
22 |
+
|
23 |
+
if __name__ == '__main__':
|
24 |
+
main()
|