Shih Hung Cheng
commited on
Commit
·
75cb1f5
1
Parent(s):
a6ff3ac
Add application file
Browse files
app.py
CHANGED
@@ -1,7 +1,13 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
def greet(name):
|
4 |
-
return "Hello " + name + "!!"
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from telegram import Update
|
2 |
+
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
|
3 |
|
|
|
|
|
4 |
|
5 |
+
async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
6 |
+
await update.message.reply_text(f'Hello {update.effective_user.first_name}')
|
7 |
+
|
8 |
+
|
9 |
+
app = ApplicationBuilder().token("6164672135:AAGTUz-d1XnlNCxeIalvNODmB8sFQvTot1M").build()
|
10 |
+
|
11 |
+
app.add_handler(CommandHandler("start", hello))
|
12 |
+
|
13 |
+
app.run_polling()
|