-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
26 lines (21 loc) · 694 Bytes
/
bot.py
File metadata and controls
26 lines (21 loc) · 694 Bytes
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
from telegram.ext import (
ApplicationBuilder,
CommandHandler,
MessageHandler,
filters
)
from config import TELEGRAM_BOT_TOKEN
from handlers.start import start
from handlers.help import help_command
from handlers.clear import clear
from handlers.chat import chat
def main():
app = ApplicationBuilder().token(TELEGRAM_BOT_TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(CommandHandler("help", help_command))
app.add_handler(CommandHandler("clear", clear))
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, chat))
print("🤖 Bot is running...")
app.run_polling()
if __name__ == "__main__":
main()