Select right group from regex
This commit is contained in:
parent
c321efa8f7
commit
1248ae3b81
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ class AutoReactCog(commands.Cog):
|
|||
self.bot = bot
|
||||
config = get_config()
|
||||
self.db = DBManager(config.mongo).mongo
|
||||
self.custom_emote = re.compile(r"^<:[A-Za-z0-9_-]+:([0-9]+)>$")
|
||||
self.custom_emote = re.compile(r"^<:.*:([0-9]+)>$")
|
||||
self.standard_emote = re.compile(
|
||||
r"^[\U0001F100-\U000E007F]{0,}[\u200d-\ufe0f]{0,}?[\U0001F100-\U000E007F]{0,}?$"
|
||||
)
|
||||
|
@ -85,7 +85,7 @@ class AutoReactCog(commands.Cog):
|
|||
)
|
||||
return
|
||||
if custom_emoji:
|
||||
emoji_id = int(custom_emoji.group(0))
|
||||
emoji_id = int(custom_emoji.group(1))
|
||||
if not find(lambda x: x.id == emoji_id, ctx.guild.emojis):
|
||||
await ctx.send("Please use a custom emote from this server.")
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue