Closed matcool closed 7 years ago
You most likely aren't trying to add an emoji. What is your code?
Also see: http://discordpy.readthedocs.io/en/latest/faq.html#how-can-i-add-a-reaction-to-a-message
elif msw("!addreaction"): await client.add_reaction(message, "<:lenny:305363712599130112>") Notes : msw = message.content.startswith
I also tried message.id
When passing a custom emoji as text, you use name:id
.
await client.add_reaction(message, "lenny:305363712599130112")
If this still doesn't work, your bot doesn't have access to the custom emoji.
Still isnt working :/
I just tried :
await client.add_reaction(message, "wink:305366787204317185")
and
await client.add_reaction(message.id, "wink:305366787204317185")
Neither worked.
What error are you getting? Is it different from before?
discord.errors.HTTPException: BAD REQUEST (status code: 400): Unknown Emoji
Your bot doesn't have access to whatever emoji you are trying to use. Note that custom emoji for servers will only work in their respective servers under most cases, and your bot may not be able to access the emoji you can. You will likely have to use a different emoji for whatever purpose you need reactions for.
Use discord.utils.get()
to get the Emoji
object and pass it in instead of the string (for custom emojis)
For normal ones just pass the raw emoji. Eg: 👌
When giving emojis like :ok_hand:
, the bot still says its a Unknown Emoji
@MatCorgi You must use the unicode symbol.
Please read the FAQ entry on this because it answers many of your questions surrounding add_reaction
.
Well so i have to get some better editor since when i paste a unicode symbol on idle, it crashes.
finally
I have looked in the docs, and everywhere, but i cant get add_reaction to work. In my current status, the code is giving this error "discord.errors.HTTPException: BAD REQUEST (status code: 400) ". Please help me ;3;