Skip to content

Commit

Permalink
[Fun] Add missing underscore detection for custom emojis
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Nov 29, 2023
1 parent 5e889e8 commit 29219e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fun/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ async def react(
# this is the string that will hold all our unicode converted characters from msg

# replace all custom server emoji <:emoji:123456789> with "<" and add emoji ids to non_unicode_emoji_list
emotes = re.findall(r"<a?:(?:[a-zA-Z0-9]+?):(?:[0-9]+?)>", msg.lower())
react_me = re.sub(r"<a?:([a-zA-Z0-9]+?):([0-9]+?)>", "", msg.lower())
emotes = re.findall(r"<a?:(?:[a-zA-Z0-9\_]+?):(?:[0-9]+?)>", msg.lower())
react_me = re.sub(r"<a?:([a-zA-Z0-9\_]+?):([0-9]+?)>", "", msg.lower())

for emote in emotes:
reactions.append(discord.utils.get(self.bot.emojis, id=int(emote.split(":")[-1][:-1])))
Expand Down

0 comments on commit 29219e5

Please sign in to comment.