Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension fixes #817

Merged
merged 7 commits into from
Jan 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update bot.py
  • Loading branch information
plun1331 authored Jan 19, 2022
commit f8078abbcf87149020a3678b1c951123dc8857b9
3 changes: 3 additions & 0 deletions discord/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ def remove_application_command(
The command that was removed. If the name is not valid then
``None`` is returned instead.
"""
if command.id is None:
index = self._pending_application_commands.index(command)
return self._pending_application_commands.pop(index)
return self._application_commands.pop(command.id)

@property
Expand Down