Please post your error as text, also, please explain next time that you are using python and nextcord. Otherwise, please link your repl (not invite) so that we can help you.
1 Like
There are a few ways to include emojis as a string in Python:
- You can use the Unicode associated with the emoji you want:
print("\U+1F600")
# 😀
print("\U+1F606")
# 😆︎
print("\U+1F923")
# 🤣︎
- You can also use CLDR names by adding a
\N
with curly braces around the name of the emoji:
print("\N{grinning face}")
# 😀
print("\N{slightly smiling face}")
# 🙂︎
print("\N{winking face}")
# 😉︎
- You can install a module called
emoji
and insertimport emoji
at the top of your python code. Then you can useemoji.emojize()
to insert emoji names:
# import emoji module
import emoji
print(emoji.emojize(":grinning_face_with_big_eyes:"))
# 😃︎
print(emoji.emojize(":winking_face_with_tongue:"))
# 😜︎
print(emoji.emojize(":zipper-mouth_face:"))
# 🤐︎
1 Like
Helpful for the console, but not really for discord. In discord, :name:
automatically works, and there is special syntax for native emojis, and an api built-in.
@AlexandreParrot in this case just use something like this:
Button(…, emoji="😃")
1 Like