Skip to content

Commit a5de405

Browse files
authored
Fix message content while handling commands in reply messages (#306)
* Fix message content while handling reply messages Instead of stripping only the user who was replied to, currently only the second word of the message is set as message content when handling commands. The rest of the message got stripped to. So `@dnns01_ This is a reply` was changed to `This` instead of `This is a reply` * Updated changelog
1 parent f26b155 commit a5de405

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Master
55
- TwitchIO
66
- Bug fixes
77
- Added ``self.registered_callbacks = {}`` to Bot and :func:`Client.from_client_credentials`
8+
- Fixed message content while handling commands in reply messages
89

910
- ext.commands:
1011
- Bug fixes

twitchio/ext/commands/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ async def handle_commands(self, message):
330330
331331
"""
332332
if "reply-parent-msg-id" in message.tags:
333-
message.content = message.content.split(" ")[1]
333+
message.content = message.content.split(" ", 1)[1]
334334
context = await self.get_context(message)
335335
await self.invoke(context)
336336

0 commit comments

Comments
 (0)