forked from viveksantayana/geas-bot
Added migrate command. Bot ready for testing.
This commit is contained in:
@ -95,7 +95,6 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
bot_token=os.getenv('TEST_3_TOKEN'),
|
||||
guild_id=ctx.guild.id
|
||||
)
|
||||
# try:
|
||||
target = list(filter(lambda t: t['name'] == command, c))[0]['id']
|
||||
await utils.manage_commands.remove_slash_command(
|
||||
bot_id=self.client.user.id,
|
||||
@ -104,8 +103,6 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
cmd_id=target
|
||||
)
|
||||
await ctx.reply(f'```Slash command {command} has been deleted for the guild {ctx.guild.name}.```')
|
||||
# except:
|
||||
# raise commands.CommandError(message=f'The command `/{command}` was not found.')
|
||||
|
||||
@commands.command(
|
||||
name='addcommand',
|
||||
@ -155,31 +152,5 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
await self.client.slash.sync_all_commands()
|
||||
await ctx.reply(f'```All slash commands have been synced with the Server.```')
|
||||
|
||||
# @commands.command(
|
||||
# name='removecogcommands',
|
||||
# aliases=['clearcogcommands'],
|
||||
# description='Removes /commands defined in a particular cog.',
|
||||
# brief='Remove /command by cog.'
|
||||
# )
|
||||
# async def _removecogcommands(self, ctx:commands.Context, cogName:str):
|
||||
# try:
|
||||
# SlashCommand.remove_cog_commands(self.client, cogName)
|
||||
# await ctx.reply(f'```All commands from cog `{cogName}` have been removed.```')
|
||||
# except Exception as e:
|
||||
# raise commands.CommandError(e)
|
||||
|
||||
# @commands.command(
|
||||
# name='getcogcommands',
|
||||
# aliases=['addcogcommands'],
|
||||
# description='Adds /commands defined in a particular cog.',
|
||||
# brief='Add /command by cog.'
|
||||
# )
|
||||
# async def _getcogcommands(self, ctx:commands.Context, cogName:str):
|
||||
# try:
|
||||
# SlashCommand.get_cog_commands(cogName)
|
||||
# await ctx.reply(f'```All commands from cog `{cogName}` have been removed.```')
|
||||
# except Exception as e:
|
||||
# raise commands.CommandError(e)
|
||||
|
||||
def setup(client):
|
||||
client.add_cog(Debug(client))
|
Reference in New Issue
Block a user