When I try to add the 0️⃣ emoji as a reaction I get an Unknown Emoji error.
await client.add_reaction(message, "0️⃣")
This doesn't work with the other keycaps either. I have been unable to find a workaround.
Have you tried using a Unicode string like one starting in \u?
Please ask in the Discord API or discord.py servers for other questions like this.
@laggycomputer The keycap emojis are a combination of three codes, and I should be able to get it with: \u0030\uFE0F\u20E3, however, this doesn't work either. I have also tried \N{keycap: 0}.
I'll ask in the discord api server.
The Unicode string for 0️⃣ would be "0u20e3".
Or "0\N{combining enclosing keycap}"
@CapnS @bmintz ah ok that worked. Still not sure why the code I posted above didn't work, but it's no big deal. Thanks!
Discord doesn't use Variation Selector-16 (U+FE0F) to display/combine emoji.
For example, if you directly copy and paste the three Unicode characters you're using in your code (0️⃣) into Discord, it will not render the emoji properly.
Simply removing the Variation Selector-16 and using 0 with a Combining Enclosing Keycap (U+20E3), i.e. 0⃣, will work. '\u20e3' and '\N{combining enclosing keycap}' are just different ways of representing the same Combining Enclosing Keycap character.
keycap: 0 is not a valid Unicode character name, so \N{keycap: 0} will raise a syntax error telling you this.
Since your issue seems to have been resolved, feel free to close it now, and as previously indicated and as the README recommends, for future questions like this, you should join either the official discord.py server or the Discord API server for help.
Most helpful comment
Discord doesn't use Variation Selector-16 (U+FE0F) to display/combine emoji.
For example, if you directly copy and paste the three Unicode characters you're using in your code (
0️⃣) into Discord, it will not render the emoji properly.Simply removing the Variation Selector-16 and using
0with a Combining Enclosing Keycap (U+20E3), i.e.0⃣, will work.'\u20e3'and'\N{combining enclosing keycap}'are just different ways of representing the same Combining Enclosing Keycap character.keycap: 0is not a valid Unicode character name, so\N{keycap: 0}will raise a syntax error telling you this.Since your issue seems to have been resolved, feel free to close it now, and as previously indicated and as the README recommends, for future questions like this, you should join either the official discord.py server or the Discord API server for help.