Skip to content

Conversation

@spinnerich
Copy link
Contributor

@spinnerich spinnerich commented Dec 28, 2020

Description

Added the possibility to delete commands which are not used by the bot but are still registered to the Discord API.

Usage

Normal usage:

from discord.ext import commands
from discord_slash import SlashCommand
bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())

slash = SlashCommand(bot, auto_delete=True) # Auto delete at startup
await slash.delete_unused_commands() # Cleanup at a later point

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Added deletion of unused commands
@4surix
Copy link
Contributor

4surix commented Dec 29, 2020

It's a good idea !
I think it's better than my function to delete all the commands #41 (well maybe some people will have the use of my function) but your function is more like what I wanted to do.

@eunwoo1104
Copy link
Contributor

First of all, sorry for the edit thing, I accidentally clicked the wrong one.
Merging this pull request. Thank you for contributing!

@eunwoo1104 eunwoo1104 merged commit 618febf into interactions-py:master Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants