#Getting emoji name instead of unicode emojis

1 messages · Page 1 of 1 (latest)

wispy herald
#

Hello, I'm trying to make add a feature to my discord bot to remove any bad emoji like the example bellow but it gets the emoji unicode instead of emoji name (same goes for reaction.emoji) so it doesn't work with discord default emojis

@client.event
async def on_reaction_add(reaction: disnake.Reaction, user: disnake.User):
    name=str(reaction) # the unicode emoji instead of emoji name
    if "bad" in name: await reaction.message.channel.send("bad reaction detected")
quartz dragon
#

<​:sad:1314631658082930700> for example

wispy herald
quartz dragon
#

then idrk, sorry

regal haven
wispy herald
#

for example 🇦 emojis have regional in their name

#

but if there is a method to do it without a API it would be better

wispy herald