From a4dc66396e6df1a7583e76237afd11bd4f7298a9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 2 Oct 2022 01:11:54 +0200 Subject: [PATCH] Migrated restart_command #42 --- src/bot_core/service/message_service.py | 3 +-- src/modules/admin/command/restart_command.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bot_core/service/message_service.py b/src/bot_core/service/message_service.py index f7696c6356..1052edc69d 100644 --- a/src/bot_core/service/message_service.py +++ b/src/bot_core/service/message_service.py @@ -104,8 +104,7 @@ class MessageService(MessageServiceABC): await asyncio.sleep(wait_before_delete) if is_persistent: - await self.delete_message(ctx.message, without_tracking) return if ctx.guild is not None: - await self.delete_messages(List(discord.Message, [msg, ctx.message]), ctx.guild.id) + await self.delete_message(msg) diff --git a/src/modules/admin/command/restart_command.py b/src/modules/admin/command/restart_command.py index e8de4f5b27..d04308fa19 100644 --- a/src/modules/admin/command/restart_command.py +++ b/src/modules/admin/command/restart_command.py @@ -35,7 +35,7 @@ class RestartCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command() + @commands.hybrid_command() @commands.guild_only() async def restart(self, ctx: Context): self._logger.debug(__name__, f'Received command restart {ctx}')