Sprint 0.2 #55

Merged
edraft merged 27 commits from 0.2 into master 2022-10-03 02:30:43 +02:00
5 changed files with 15 additions and 5 deletions
Showing only changes of commit 7496a17cfa - Show all commits

View File

@ -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}')

View File

@ -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'

View File

@ -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)

View File

@ -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')

View File

@ -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):