Skip to content

Commit c428987

Browse files
committed
bug fix + version bump
1 parent f7aa7b1 commit c428987

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docs/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
:orphan:
22

3+
2.8.1
4+
======
5+
- ext.commands
6+
- Bug fixes
7+
- Fixed an issue where ``CommandNotFound`` couldn't be processed from ``get_context``.
8+
39
2.8.0
410
======
511
- TwitchIO

twitchio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
__author__ = "TwitchIO, PythonistaGuild"
2929
__license__ = "MIT"
3030
__copyright__ = "Copyright 2017-2022 (c) TwitchIO"
31-
__version__ = "2.8.0"
31+
__version__ = "2.8.1"
3232

3333
from .client import Client
3434
from .user import *

twitchio/ext/commands/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ async def get_context(self, message, *, cls=None):
302302
command_ = parsed.pop(0)
303303
except KeyError:
304304
context = cls(message=message, bot=self, prefix=prefix, command=None, valid=False, view=view)
305-
error = CommandNotFound("No valid command was passed.")
305+
error = CommandNotFound("No valid command was passed.", "")
306306

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

319319
self.run_event("command_error", context, error)
320320
return context

0 commit comments

Comments
 (0)