Skip to content

Commit fc82522

Browse files
authored
Reconstruct original message after handling commands (#307)
* Fix message content while handling reply messages * get original message back, after handling commands
1 parent a5de405 commit fc82522

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

twitchio/ext/commands/bot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,15 @@ async def handle_commands(self, message):
329329
The message object to get content of and context for.
330330
331331
"""
332+
original_content = message.content
333+
332334
if "reply-parent-msg-id" in message.tags:
333335
message.content = message.content.split(" ", 1)[1]
334336
context = await self.get_context(message)
335337
await self.invoke(context)
336338

339+
message.content = original_content
340+
337341
async def invoke(self, context):
338342
# TODO Docs
339343
if not context.prefix or not context.is_valid:

0 commit comments

Comments
 (0)