Skip to content

Commit

Permalink
await
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomGuyJCI committed Oct 6, 2024
1 parent 74ab64d commit e74bb5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orchard/scan/sources/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def get_iids(self):
current_after = int(post["id"])

# check the post does not have a :no-entry-sign: by the OP.
remove_attachments = self.check_reaction(post, "🚫")
remove_attachments = await self.check_reaction(post, "🚫")

# a message can only have a maximum of 10 attachments, so we use number reactions
number_reactions = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"]
Expand All @@ -148,7 +148,7 @@ async def get_iids(self):
attachment_numbers = []
for i, attachment in enumerate(post["attachments"]):
if attachment["filename"].endswith(".rdzip"):
if remove_attachments and self.check_reaction(post, number_reactions[i]):
if remove_attachments and await self.check_reaction(post, number_reactions[i]):
ignore_all_attachments = False
continue
attachment_numbers.append(i)
Expand Down

0 comments on commit e74bb5c

Please sign in to comment.