Skip to content

Commit

Permalink
Added poll_check to commands.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FirePlank committed Oct 26, 2023
1 parent 0062559 commit de91f3b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bot/extensions/polls/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ def reactions(self):
9: "9️⃣",
10: "🔟",
}

def poll_check(self, message: discord.Message):
try:
embed = message.embeds[0]
except Exception:
return False
if str(embed.footer.text).count("Poll by") == 1:
return message.author == self.bot.user
return False

@app_commands.command()
@app_commands.checks.cooldown(1, 10)
Expand Down

0 comments on commit de91f3b

Please sign in to comment.