forked from sh-edraft.de/sh_discord_bot
Migrated all other commands
This commit is contained in:
parent
0dbf33a39f
commit
7496a17cfa
@ -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}')
|
||||
|
||||
|
@ -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'
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user