From 6ef5acdce17b95ed5166a32aa479eae0cb7f8cad Mon Sep 17 00:00:00 2001 From: Igor Tolmachov Date: Wed, 20 Apr 2022 02:00:20 +0900 Subject: Рефакторинг Добавлена система заявок в группу MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/commands.py | 21 +++++++++------------ shared/instances.py | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'shared') diff --git a/shared/commands.py b/shared/commands.py index 34f9dbb..a54a770 100644 --- a/shared/commands.py +++ b/shared/commands.py @@ -1,17 +1,14 @@ -from aiogram.types import \ - BotCommand as cmd, \ - BotCommandScopeAllGroupChats as group, \ - BotCommandScopeAllPrivateChats as private +from aiogram.types import BotCommand as cmd +from aiogram.types import BotCommandScopeAllGroupChats as group +from aiogram.types import BotCommandScopeAllPrivateChats as private commands = { group(): [ - cmd('gen', 'Высрвть текст'), - cmd('del', 'Смыть говно'), - cmd('pin', 'Повесить говно на стенку'), - cmd('gif', 'Превратить картинку в gif'), - cmd('chance', 'Установить шанс высирания говна') + cmd("gen", "Высрвть текст"), + cmd("del", "Смыть говно"), + cmd("pin", "Повесить говно на стенку"), + cmd("gif", "Превратить картинку в gif"), + cmd("chance", "Установить шанс высирания говна"), ], - private(): [ - cmd('gif', 'Превратить картинку в gif') - ] + private(): [cmd("gif", "Превратить картинку в gif")], } diff --git a/shared/instances.py b/shared/instances.py index 5351f9c..280ec49 100644 --- a/shared/instances.py +++ b/shared/instances.py @@ -1,7 +1,7 @@ from aiogram import Bot, Dispatcher + from config import token -print(token) bot = Bot(token=token) dp = Dispatcher(bot) gen_chance = 10 -- cgit v1.3