-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
51 lines (39 loc) · 1.12 KB
/
Copy pathmain.py
File metadata and controls
51 lines (39 loc) · 1.12 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from telegram.ext import (
ApplicationBuilder,
CommandHandler,
MessageHandler,
filters,
)
from config import BOT_TOKEN
from logger import logger
from handlers.info import (
start,
help_command,
about,
)
from handlers.tools import (
uuid_command,
password_command,
hash_command,
echo,
ping,
)
from handlers.chat import chat
def main():
app = ApplicationBuilder().token(BOT_TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(CommandHandler("hello", help_command))
app.add_handler(CommandHandler("help", help_command))
app.add_handler(CommandHandler("about", about))
app.add_handler(CommandHandler("ping", ping))
app.add_handler(CommandHandler("uuid", uuid_command))
app.add_handler(CommandHandler("password", password_command))
app.add_handler(CommandHandler("hash", hash_command))
app.add_handler(CommandHandler("echo",echo))
app.add_handler(
MessageHandler(filters.TEXT & ~filters.COMMAND, chat)
)
logger.info("🚀 DevMate started!")
app.run_polling()
if __name__ == "__main__":
main()