Skip to content

Commit fd6dfb7

Browse files
committed
Bot will not attempt to find for linked message when the recipient reacts to reactions on confirm thread creation message.
1 parent df41d31 commit fd6dfb7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bot.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,14 @@ async def handle_reaction_events(self, payload):
11881188
# the reacted message is the corresponding thread creation embed
11891189
# closing thread
11901190
return await thread.close(closer=user)
1191+
if (
1192+
message.author == self.user
1193+
and message.embeds
1194+
and self.config.get("confirm_thread_creation")
1195+
and message.embeds[0].title == self.config["confirm_thread_creation_title"]
1196+
and message.embeds[0].description == self.config["confirm_thread_response"]
1197+
):
1198+
return
11911199
if not thread.recipient.dm_channel:
11921200
await thread.recipient.create_dm()
11931201
try:

0 commit comments

Comments
 (0)