Added slash command support
This commit is contained in:
@@ -20,7 +20,7 @@ class PingCommand(DiscordCommandABC):
|
||||
|
||||
self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}')
|
||||
|
||||
@commands.command()
|
||||
@commands.hybrid_command()
|
||||
async def ping(self, ctx: Context):
|
||||
self._logger.debug(__name__, f'Received command ping {ctx}')
|
||||
self._logger.info(__name__, f'Bot name {self._bot.user.name}')
|
||||
|
||||
@@ -20,9 +20,12 @@ class PurgeCommand(DiscordCommandABC):
|
||||
|
||||
self._logger.trace(__name__, f'Loaded command service: {type(self).__name__}')
|
||||
|
||||
@commands.command()
|
||||
@commands.hybrid_command()
|
||||
async def purge(self, ctx: Context):
|
||||
self._logger.debug(__name__, f'Received command ping {ctx}')
|
||||
self._logger.info(__name__, f'Bot name {self._bot.user.name}')
|
||||
self._logger.trace(__name__, f'Finished ping command')
|
||||
await ctx.channel.purge()
|
||||
if ctx.interaction is None:
|
||||
return
|
||||
await ctx.interaction.response.send_message('Purged this channel xD')
|
||||
|
||||
Reference in New Issue
Block a user