Allow force enabling app commands using flag in extras (#6018)

This commit is contained in:
Flame442
2023-04-14 17:59:21 -04:00
committed by GitHub
parent ccdd1ca892
commit aa51fd9ad1
4 changed files with 98 additions and 25 deletions

View File

@@ -1930,6 +1930,8 @@ class Red(
self.dispatch("command_add", subcommand)
if permissions_not_loaded:
subcommand.requires.ready_event.set()
if isinstance(command, (commands.HybridCommand, commands.HybridGroup)):
command.app_command.extras = command.extras
def remove_command(self, name: str, /) -> Optional[commands.Command]:
command = super().remove_command(name)