From 5bd137a3342e8ea8561a3c73a7fd81d2565dc784 Mon Sep 17 00:00:00 2001 From: dize_dev Date: Mon, 30 Oct 2023 00:05:50 +0600 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BE=20=D0=B1=D0=BE=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 3 +++ routes/deletedmsg.py | 6 ++---- routes/game_handler.py | 7 +++++-- routes/info_bot.py | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/config.py b/config.py index 0f21405..9d099c1 100644 --- a/config.py +++ b/config.py @@ -7,6 +7,9 @@ bl = UserLabeler() user = User(token=TOKEN) +prefix_bot = "хуй" +prefix_dd = "дд" + async def edit_message( message: Message, text: str = '', diff --git a/routes/deletedmsg.py b/routes/deletedmsg.py index 7ac37a7..21ae7ff 100644 --- a/routes/deletedmsg.py +++ b/routes/deletedmsg.py @@ -1,7 +1,7 @@ import datetime from custom_rules.permission import Permission from vkbottle.user import Message -from config import bl, user +from config import bl, user, prefix_dd DD_SCRIPT = ( 'var i = 0;var msg_ids = [];var count = %d;' @@ -14,12 +14,10 @@ DD_SCRIPT = ( 'API.messages.delete({"message_ids": msg_ids});return count;' ) -prefix = "дд" - @bl.message( Permission(), - text=[prefix + " "], + text=[prefix_dd + " "], ) async def dd_handler(message: Message, count: int = 2): await user.api.execute( diff --git a/routes/game_handler.py b/routes/game_handler.py index 6ec9d5f..f4f6442 100644 --- a/routes/game_handler.py +++ b/routes/game_handler.py @@ -1,10 +1,13 @@ import asyncio from vkbottle.user import Message -from config import bl, edit_message +from config import bl, edit_message, prefix_bot from custom_rules.permission import Permission -@bl.message(Permission(), text="игра") +@bl.message( + Permission(), + text=[prefix_bot + " игра"], +) async def game(message: Message): loader = ( '⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬜⬜⬜⬜⬜⬜⬜', diff --git a/routes/info_bot.py b/routes/info_bot.py index 611baf9..49dd6b0 100644 --- a/routes/info_bot.py +++ b/routes/info_bot.py @@ -1,9 +1,9 @@ from custom_rules.permission import Permission from vkbottle.user import Message -from config import bl, edit_message +from config import bl, edit_message, prefix_bot -@bl.message(Permission(), text="бот") +@bl.message(Permission(), text=[prefix_bot + " бот"]) async def hello(message: Message): await edit_message( message,