From 2f92dfe22f87d06803713c139b67579b579e7eb6 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Tue, 19 Jul 2022 12:06:45 +0200 Subject: [PATCH] Moved purge command --- src/bot/startup_discord_extension.py | 2 +- src/bot/translation/de.json | 5 +++-- src/modules/moderator/command/__init__.py | 0 src/modules/{base => moderator}/command/purge_command.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 src/modules/moderator/command/__init__.py rename src/modules/{base => moderator}/command/purge_command.py (98%) diff --git a/src/bot/startup_discord_extension.py b/src/bot/startup_discord_extension.py index 6a02dd0f..b1ae518e 100644 --- a/src/bot/startup_discord_extension.py +++ b/src/bot/startup_discord_extension.py @@ -11,7 +11,7 @@ from modules.base.command.afk_command import AFKCommand from modules.base.command.help_command import HelpCommand from modules.base.command.info_command import InfoCommand from modules.base.command.ping_command import PingCommand -from modules.base.command.purge_command import PurgeCommand +from modules.moderator.command.purge_command import PurgeCommand from modules.base.command.user_info_command import UserInfoCommand from modules.base.events.base_on_member_join_event import BaseOnMemberJoinEvent from modules.base.events.base_on_member_remove_event import BaseOnMemberRemoveEvent diff --git a/src/bot/translation/de.json b/src/bot/translation/de.json index cc847887..36b4e773 100644 --- a/src/bot/translation/de.json +++ b/src/bot/translation/de.json @@ -10,11 +10,12 @@ "restart_message": "Bin gleich wieder da :D", "shutdown_message": "Trauert nicht um mich, es war eine logische Entscheidung. Das Wohl von Vielen, es wiegt schwerer als das Wohl von Wenigen oder eines Einzelnen. Ich war es und ich werde es immer sein, Euer Freund. Lebt lange und in Frieden :)" }, - "moderator": {}, + "moderator": { + "goodbye_message": "Schade das du uns so schnell verlässt :(" + }, "base": { "welcome_message": "Hello There!\nIch heiße dich bei {} herzlichst willkommen!", "welcome_message_for_team": "{} hat gerade das Irrenhaus betreten.", - "goodbye_message": "Schade das du uns so schnell verlässt :(", "purge_message": "Na gut..., ich lösche alle Nachrichten wenns sein muss.", "afk_command_channel_missing_message": "Zu unfähig einem Sprachkanal beizutreten?", "afk_command_move_message": "Ich verschiebe dich ja schon... (◔_◔)", diff --git a/src/modules/moderator/command/__init__.py b/src/modules/moderator/command/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/modules/base/command/purge_command.py b/src/modules/moderator/command/purge_command.py similarity index 98% rename from src/modules/base/command/purge_command.py rename to src/modules/moderator/command/purge_command.py index 03a70fef..871aebe4 100644 --- a/src/modules/base/command/purge_command.py +++ b/src/modules/moderator/command/purge_command.py @@ -47,7 +47,7 @@ class PurgeCommand(DiscordCommandABC): self._logger.trace(__name__, f'Finished purge command') return - await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.purge_message')) + await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.moderator.purge_message')) await asyncio.sleep(server_settings.message_delete_timer) try: await ctx.channel.purge()