evgeniy778 commited on
Commit
e8dfd19
·
verified ·
1 Parent(s): 498209e

Update telegram_bot.py

Browse files
Files changed (1) hide show
  1. telegram_bot.py +18 -39
telegram_bot.py CHANGED
@@ -1,6 +1,6 @@
1
  # =====================================================
2
  # Apckeyl Framework
3
- # Version 2.0
4
  # telegram_bot.py
5
  # =====================================================
6
 
@@ -18,6 +18,8 @@ import asyncio
18
  from aiogram import Bot
19
  from aiogram import Dispatcher
20
 
 
 
21
 
22
  # -----------------------------------------------------
23
  # Telegram Secrets
@@ -48,6 +50,13 @@ bot = Bot(
48
 
49
  dispatcher = Dispatcher()
50
 
 
 
 
 
 
 
 
51
 
52
  # -----------------------------------------------------
53
  # Main
@@ -55,47 +64,17 @@ dispatcher = Dispatcher()
55
 
56
  async def main():
57
 
58
- print(
59
-
60
- "===================================="
61
-
62
- )
63
 
64
- print(
65
-
66
- "Apckeyl Telegram Framework"
67
-
68
- )
69
-
70
- print(
71
-
72
- "Version 2.0"
73
-
74
- )
75
 
76
- print(
77
 
78
- "BOT_TOKEN loaded successfully."
79
-
80
- )
81
-
82
- print(
83
-
84
- "===================================="
85
-
86
- )
87
-
88
- print(
89
-
90
- "Telegram Framework is ready."
91
-
92
- )
93
-
94
- print(
95
-
96
- "Waiting for Controller..."
97
-
98
- )
99
 
100
 
101
  # -----------------------------------------------------
 
1
  # =====================================================
2
  # Apckeyl Framework
3
+ # Version 2.1
4
  # telegram_bot.py
5
  # =====================================================
6
 
 
18
  from aiogram import Bot
19
  from aiogram import Dispatcher
20
 
21
+ from telegram_controller import TelegramController
22
+
23
 
24
  # -----------------------------------------------------
25
  # Telegram Secrets
 
50
 
51
  dispatcher = Dispatcher()
52
 
53
+ controller = TelegramController(
54
+
55
+ bot=bot,
56
+
57
+ dispatcher=dispatcher,
58
+
59
+ )
60
 
61
  # -----------------------------------------------------
62
  # Main
 
64
 
65
  async def main():
66
 
67
+ print()
 
 
 
 
68
 
69
+ print("====================================")
70
+ print("Apckeyl Telegram Framework")
71
+ print("Version 2.1")
72
+ print("====================================")
73
+ print()
 
 
 
 
 
 
74
 
75
+ print("BOT_TOKEN loaded successfully.")
76
 
77
+ await controller.start()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
 
80
  # -----------------------------------------------------