Skip to content

Commit f26b155

Browse files
Do type conversion for variable positional arguments and update docs (#297)
Co-authored-by: Tom <[email protected]>
1 parent e24e309 commit f26b155

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Master
66
- Bug fixes
77
- Added ``self.registered_callbacks = {}`` to Bot and :func:`Client.from_client_credentials`
88

9+
- ext.commands:
10+
- Bug fixes
11+
- Add type conversion for variable positional arguments
12+
913
- ext.pubsub
1014
- Bug fixes
1115
- :class:`~twitchio.ext.pubsub.PubSubModerationAction` now handles missing keys
@@ -34,6 +38,9 @@ Massive documentation updates
3438
- Fix :class:`twitchio.CustomRewardRedemption` so :func:`twitchio.CustomReward.get_redemptions` returns correctly
3539

3640
- ext.commands
41+
- :func:`Bot.handle_commands` now also invokes on threads / replies
42+
- Cooldowns are now handled correctly per bucket.
43+
- Fix issue with :func:`Bot.reload_module` where module is reloaded incorrectly if exception occurs
3744
- Additions
3845
- :func:`twitchio.ext.commands.Bot.handle_commands` now also invokes on threads / replies
3946

twitchio/ext/commands/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ async def parse_args(self, context: Context, instance: Optional[Cog], parsed: di
171171
parsed.clear()
172172
break
173173
elif param.VAR_POSITIONAL:
174-
args.extend(parsed.values())
174+
args.extend([await self._convert_types(context, param, argument) for argument in parsed.values()])
175+
parsed.clear()
175176
break
176177
if parsed:
177178
pass # TODO Raise Too Many Arguments.

0 commit comments

Comments
 (0)