Skip to content

Commit d519e95

Browse files
NeloBlivionpre-commit-ci[bot]Lulalaby
authored
fix: Restore overriding on_application_command_error via listener (#2044)
* Restore app command error listener overwrite * Update CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks --------- Signed-off-by: UK <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]>
1 parent 2abfa34 commit d519e95

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ These changes are available on the `master` branch, but have not yet been releas
9393
([#2029](https://github.com/Pycord-Development/pycord/pull/2029))
9494
- Reflecting the api for gettings bans correctly.
9595
([#1922](https://github.com/Pycord-Development/pycord/pull/1922))
96+
- Restored functionality for overriding default `on_application_command_error` via
97+
listeners. ([#2044](https://github.com/Pycord-Development/pycord/pull/2044))
9698
- Fixed unloading of cogs having bridge commands.
9799
([#2048](https://github.com/Pycord-Development/pycord/pull/2048))
98100

discord/bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,8 @@ async def on_application_command_error(
11771177
11781178
This only fires if you do not specify any listeners for command error.
11791179
"""
1180+
if self._event_handlers.get("on_application_command_error", None):
1181+
return
11801182
command = context.command
11811183
if command and command.has_error_handler():
11821184
return

0 commit comments

Comments
 (0)