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

fix: Restore overriding on_application_command_error via listener #2044

Merged
merged 5 commits into from May 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -93,6 +93,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2029](https://github.com/Pycord-Development/pycord/pull/2029))
- Reflecting the api for gettings bans correctly.
([#1922](https://github.com/Pycord-Development/pycord/pull/1922))
- Restored functionality for overriding default `on_application_command_error` via listeners.
([#2044](https://github.com/Pycord-Development/pycord/pull/2044))

## [2.4.1] - 2023-03-20

Expand Down
2 changes: 2 additions & 0 deletions discord/bot.py
Expand Up @@ -1177,6 +1177,8 @@ async def on_application_command_error(

This only fires if you do not specify any listeners for command error.
"""
if self._event_handlers.get("on_application_command_error", None):
return
command = context.command
if command and command.has_error_handler():
return
Expand Down