mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 01:06:19 +00:00
🐛 fix(ChatProcess.py): fix condition to check if original message exists before appending it to messages
The condition to check if the original message exists before appending it to the messages list has been fixed. Previously, it was checking if the content of the last message in the list is equal to the content of the original message, which could lead to incorrect behavior. Now, it properly checks if the original message object is not None before appending it to the messages list.
This commit is contained in:
@@ -109,7 +109,7 @@ class Chat:
|
||||
self.message.channel, 10, self.original_message
|
||||
)
|
||||
# if latst item id is not original message id, add original message to messages
|
||||
if messages[-1].content != self.original_message.content:
|
||||
if self.original_message != None:
|
||||
messages.append(self.original_message)
|
||||
self.context = []
|
||||
for msg in messages:
|
||||
|
||||
Reference in New Issue
Block a user