Skip to content

Commit 9fe0a85

Browse files
Be more specific in add_command error message (#453)
* Be more specific in add_command error message * Update changelog - v2.9.3 --------- Co-authored-by: Tom <[email protected]>
1 parent ad580de commit 9fe0a85

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/changelog.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
:orphan:
22

3+
34
2.10.0
45
=======
56
- TwitchIO
67
- Bug fixes
78
- fix: :func:`~twitchio.PartialUser.fetch_markers` was passing list of one element from payload, now just passes element
9+
10+
- ext.commands
11+
- Changes
12+
- Added which alias failed to load in the error raised by :func:`~twitchio.ext.commands.Context.add_command`
13+
814
- ext.eventsub
915
- Additions
1016
- Added :method:`Twitchio.ext.eventsub.EventSubClient.subscribe_channel_unban_request_create <EventSubClient.subscribe_channel_unban_request_create>` /
@@ -78,7 +84,7 @@
7884
- New models for the new methods have been added:
7985
- :class:`~twitchio.ChannelFollowerEvent`
8086
- :class:`~twitchio.ChannelFollowingEvent`
81-
- New optional ``is_featured`` query parameter for :func:`~twitchio.PartialUser.fetch_clips`
87+
- New optional ``is_featured`` query parameter for :func:`~twitchio.PartialUser.fetch_clips`
8288
- New attribute :attr:`~twitchio.Clip.is_featured` for :class:`~twitchio.Clip`
8389

8490
- Bug fixes
@@ -116,14 +122,14 @@
116122
- Added :func:`~twitchio.Client.fetch_content_classification_labels` along with :class:`~twitchio.ContentClassificationLabel`
117123
- Added :attr:`~twitchio.ChannelInfo.content_classification_labels` and :attr:`~twitchio.ChannelInfo.is_branded_content` to :class:`~twitchio.ChannelInfo`
118124
- Added new parameters to :func:`~twitchio.PartialUser.modify_stream` for ``is_branded_content`` and ``content_classification_labels``
119-
125+
120126
- Bug fixes
121127
- Fix :func:`~twitchio.Client.search_categories` due to :attr:`~twitchio.Game.igdb_id` being added to :class:`~twitchio.Game`
122128
- Made Chatter :attr:`~twitchio.Chatter.id` property public
123129
- :func:`~twitchio.Client.event_token_expired` will now be called correctly when response is ``401 Invalid OAuth token``
124130
- Fix reconnect loop when Twitch sends a RECONNECT via IRC websocket
125131
- Fix :func:`~twitchio.CustomReward.edit` so it now can enable the reward
126-
132+
127133
- Other Changes
128134
- Updated the HTTPException to provide useful information when an error is raised.
129135

twitchio/ext/commands/bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def add_command(self, command: Command):
209209
if alias in self.commands:
210210
del self.commands[command.name]
211211
raise TwitchCommandError(
212-
f"Failed to load command <{command.name}>, a command with that name/alias already exists."
212+
f"Failed to load alias <{alias}> for command <{command.name}>, a command with that name/alias already exists.",
213213
)
214214
self._command_aliases[alias] = command.name
215215

0 commit comments

Comments
 (0)