diff --git a/src/modules/base/command/afk_command.py b/src/modules/base/command/afk_command.py index 10eb6af1..7e9fb698 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 4bf97471..9bbd7957 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 d3c7de65..83560783 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 f8a796ef..439b5a15 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 d9d646ba..200bfe66 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):