Skip to content

Commit

Permalink
bug fix + version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmTomahawkx committed Sep 19, 2023
1 parent f7aa7b1 commit c428987
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
:orphan:

2.8.1
======
- ext.commands
- Bug fixes
- Fixed an issue where ``CommandNotFound`` couldn't be processed from ``get_context``.

2.8.0
======
- TwitchIO
Expand Down
2 changes: 1 addition & 1 deletion twitchio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
__author__ = "TwitchIO, PythonistaGuild"
__license__ = "MIT"
__copyright__ = "Copyright 2017-2022 (c) TwitchIO"
__version__ = "2.8.0"
__version__ = "2.8.1"

from .client import Client
from .user import *
Expand Down
4 changes: 2 additions & 2 deletions twitchio/ext/commands/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ async def get_context(self, message, *, cls=None):
command_ = parsed.pop(0)
except KeyError:
context = cls(message=message, bot=self, prefix=prefix, command=None, valid=False, view=view)
error = CommandNotFound("No valid command was passed.")
error = CommandNotFound("No valid command was passed.", "")

self.run_event("command_error", context, error)
return context
Expand All @@ -314,7 +314,7 @@ async def get_context(self, message, *, cls=None):
command_ = self.commands[command_]
else:
context = cls(message=message, bot=self, prefix=prefix, command=None, valid=False, view=view)
error = CommandNotFound(f'No command "{command_}" was found.')
error = CommandNotFound(f'No command "{command_}" was found.', command_)

self.run_event("command_error", context, error)
return context
Expand Down

0 comments on commit c428987

Please sign in to comment.