diff --git a/src/modules/base/command/afk_command.py b/src/modules/base/command/afk_command.py index 10eb6af104..7e9fb698f9 100644 --- a/src/modules/base/command/afk_command.py +++ b/src/modules/base/command/afk_command.py @@ -34,10 +34,12 @@ class AFKCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command() + @commands.hybrid_command() @commands.guild_only() async def afk(self, ctx: Context): self._logger.debug(__name__, f'Received command afk {ctx}') + if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx): + return self._client_utils.received_command(ctx.guild.id) settings: BaseServerSettings = self._config.get_configuration(f'BaseServerSettings_{ctx.guild.id}') diff --git a/src/modules/base/command/help_command.py b/src/modules/base/command/help_command.py index 4bf9747178..9bbd795790 100644 --- a/src/modules/base/command/help_command.py +++ b/src/modules/base/command/help_command.py @@ -30,10 +30,12 @@ class HelpCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command() + @commands.hybrid_command() @commands.guild_only() async def help(self, ctx: Context, persistent_flag: str = None): self._logger.debug(__name__, f'Received command help {ctx}:{persistent_flag}') + if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx): + return self._client_utils.received_command(ctx.guild.id) settings: BaseServerSettings = self._config.get_configuration(f'BaseServerSettings_{ctx.guild.id}') is_persistent = persistent_flag == '--stay' diff --git a/src/modules/base/command/info_command.py b/src/modules/base/command/info_command.py index d3c7de6575..83560783c2 100644 --- a/src/modules/base/command/info_command.py +++ b/src/modules/base/command/info_command.py @@ -36,10 +36,12 @@ class InfoCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command() + @commands.hybrid_command() @commands.guild_only() async def info(self, ctx: Context, *, wait: int = None): self._logger.debug(__name__, f'Received command info {ctx},{wait}') + if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx): + return self._client_utils.received_command(ctx.guild.id) client = self._client_utils.get_client(self._bot.user.id, ctx.guild.id) diff --git a/src/modules/base/command/ping_command.py b/src/modules/base/command/ping_command.py index f8a796ef28..439b5a1528 100644 --- a/src/modules/base/command/ping_command.py +++ b/src/modules/base/command/ping_command.py @@ -29,10 +29,12 @@ class PingCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command() + @commands.hybrid_command() @commands.guild_only() async def ping(self, ctx: Context): self._logger.debug(__name__, f'Received command ping {ctx}') + if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx): + return self._client_utils.received_command(ctx.guild.id) await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.pong')) self._logger.trace(__name__, f'Finished ping command') diff --git a/src/modules/base/command/user_info_command.py b/src/modules/base/command/user_info_command.py index d9d646ba2c..200bfe66d5 100644 --- a/src/modules/base/command/user_info_command.py +++ b/src/modules/base/command/user_info_command.py @@ -50,10 +50,12 @@ class UserInfoCommand(DiscordCommandABC): self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}') - @commands.command(name='user-info') + @commands.hybrid_command(name='user-info') @commands.guild_only() async def user_info(self, ctx: Context, member: Optional[discord.Member] = None, *, wait: int = None): self._logger.debug(__name__, f'Received command user-info {ctx}:{member},{wait}') + if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx): + return self._client_utils.received_command(ctx.guild.id) if not self._permissions.is_member_moderator(ctx.author):