Don't count any untagged embeds

This commit is contained in:
Nexus 2024-04-15 21:15:12 +01:00
parent 54b7455717
commit d9fbfb16fc
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -229,13 +229,12 @@ class QuoteQuota(commands.Cog):
""" """
def is_truth(msg: discord.Message) -> bool: def is_truth(msg: discord.Message) -> bool:
if msg.author.id == 1101439218334576742: if msg.author.id == 1101439218334576742:
if msg.created_at.timestamp() <= 1713202855.80234: # if msg.created_at.timestamp() <= 1713202855.80234:
# Pre 6:30pm 15th April, embeds were not tagged for detection. # # Pre 6:30pm 15th April, embeds were not tagged for detection.
truth = any((_te.type == "rich" for _te in msg.embeds)) # truth = any((_te.type == "rich" for _te in msg.embeds))
if truth: # if truth:
self.log.debug("Found untagged rich trump truth embed: %r", msg.id) # self.log.debug("Found untagged rich trump truth embed: %r", msg.id)
return True # return True
for __t_e in msg.embeds: for __t_e in msg.embeds:
if __t_e.type == "rich" and __t_e.colour.value == 0x5448EE: if __t_e.type == "rich" and __t_e.colour.value == 0x5448EE:
self.log.debug("Found tagged rich trump truth embed: %r", msg.id) self.log.debug("Found tagged rich trump truth embed: %r", msg.id)