mirror of
https://github.com/miaowware/qrm2.git
synced 2025-02-03 09:44:07 -05:00
Merge pull request #176 from classabbyamp/5c-fixnotfound
Mini-fix: extraneous warning reaction on messages starting with "??"
This commit is contained in:
commit
08ca455895
@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fixed ditto marks (") appearing in the ae7q call command.
|
- Fixed ditto marks (") appearing in the ae7q call command.
|
||||||
- Fixed issue where incorrect table was parsed in ae7q call command.
|
- Fixed issue where incorrect table was parsed in ae7q call command.
|
||||||
|
- Fixed warning emoji reaction on messages starting with "??".
|
||||||
|
|
||||||
|
|
||||||
## [2.1.0] - 2020-01-04
|
## [2.1.0] - 2020-01-04
|
||||||
|
7
main.py
7
main.py
@ -164,8 +164,11 @@ async def on_command_error(ctx: commands.Context, err: commands.CommandError):
|
|||||||
if isinstance(err, commands.UserInputError):
|
if isinstance(err, commands.UserInputError):
|
||||||
await cmn.add_react(ctx.message, cmn.emojis.warning)
|
await cmn.add_react(ctx.message, cmn.emojis.warning)
|
||||||
await ctx.send_help(ctx.command)
|
await ctx.send_help(ctx.command)
|
||||||
elif isinstance(err, commands.CommandNotFound) and not ctx.invoked_with.startswith("?"):
|
elif isinstance(err, commands.CommandNotFound):
|
||||||
await cmn.add_react(ctx.message, cmn.emojis.question)
|
if ctx.invoked_with.startswith(("?", "!")):
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
await cmn.add_react(ctx.message, cmn.emojis.question)
|
||||||
elif isinstance(err, commands.CheckFailure):
|
elif isinstance(err, commands.CheckFailure):
|
||||||
# Add handling of other subclasses of CheckFailure as needed.
|
# Add handling of other subclasses of CheckFailure as needed.
|
||||||
if isinstance(err, commands.NotOwner):
|
if isinstance(err, commands.NotOwner):
|
||||||
|
Loading…
Reference in New Issue
Block a user