-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
21 lines (16 loc) · 830 Bytes
/
main.py
File metadata and controls
21 lines (16 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from aiogram.utils import executor
from game import *
@dp.message_handler(commands='start')
async def Test(message: types.Message):
await message.answer("Добро пожаловать в ArenaGame! Давайте начнем играть",
reply_markup=kb_start)
Delete()
@dp.message_handler(Text("Закончить игру"), state=FSMGame.game)
async def Exit(message: types.Message, state: FSMContext):
await state.finish()
CloseSession(str(message.from_user.id))
await message.answer("Вы успешно вышли из игры!")
await message.answer("Добро пожаловать в ArenaGame! Давайте начнем играть",
reply_markup=kb_start)
if __name__ == "__main__":
executor.start_polling(dp,skip_updates=True)