From d85f28f042463d319fda2cc59b7d39998c5a9496 Mon Sep 17 00:00:00 2001 From: deadzilla Date: Tue, 14 Jul 2026 22:48:30 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=B1=D1=8B=D1=82=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20ctx=20=D0=B2?= =?UTF-8?q?=20on=5Fcommand=5Ferror=20(ctx=20=D0=B2=D1=81=D0=B5=D0=B3=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D0=BD=20discord.p?= =?UTF-8?q?y)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 61c8847..a3bbf42 100644 --- a/bot.py +++ b/bot.py @@ -156,7 +156,7 @@ class BotRunner: return # Терминал — детали для разработчика - cmd_name = ctx.command.name if ctx and ctx.command else "?" + cmd_name = ctx.command.name if ctx.command else "?" logger.error( "Ошибка команды %s: %s", cmd_name, @@ -168,8 +168,7 @@ class BotRunner: # ctx.interaction есть только у slash-команд (AutoshardedInteractionContext) # Для текстовых команд (!prefix) атрибута нет — используем hasattr if ( - ctx - and hasattr(ctx, "interaction") + hasattr(ctx, "interaction") and ctx.interaction and ctx.interaction.response.is_done() ):