-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (23 loc) · 1.14 KB
/
main.py
File metadata and controls
28 lines (23 loc) · 1.14 KB
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
import os
from dotenv import load_dotenv
from telegram import Update
from telegram.ext import Application, CommandHandler, ContextTypes
# Define the function that runs on /start
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text("Hello, I'm QB! To launch me please go to the chat interface or to my profile menu, and click 'Open App'")
await update.message.reply_text("Chat interface:")
await update.message.reply_photo(photo=open("chat_interface.png", "rb"))
await update.message.reply_text("Profile menu:")
await update.message.reply_photo(photo=open("profile_menu.png", "rb"))
await update.message.reply_text("Once you join the queue, you will be identified by a unique nickname:")
await update.message.reply_photo(photo=open("nickname.png", "rb"))
await update.message.reply_text("HAVE FUN!")
def main():
load_dotenv()
application = Application.builder().token(os.getenv("BOT_TOKEN")).build()
# Register the handler
application.add_handler(CommandHandler("start", start))
# Run the bot
application.run_polling()
if __name__ == '__main__':
main()