D
D
doom252021-06-27 19:02:34
Python
doom25, 2021-06-27 19:02:34

How to send emoji via discord.py?

Hello. I want the bot to send a message with an emoji, but it doesn't send. Help me please. Here is my code:

@client.command(aliases = ['balance'])
async def __balance(ctx, member: discord.Member = None):
  await ctx.channel.purge(limit = 1)
  if member is None:
    await ctx.send(embed = discord.Embed(
      description = f"""Баланс пользователя **{ctx.author}** равен **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(ctx.author.id)).fetchone()[0]} :1:**"""
    ))
  if ctx.guild.get_role(705366582670393354) in ctx.author.roles:
    await ctx.send(embed = discord.Embed(
      description = f"""Баланс пользователя **{member}** равен **{cursor.execute("SELECT cash FROM users WHERE id = {}".format(member.id)).fetchone()[0]} :1:**"""
    ))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Endora Blackwell, 2021-06-27
@doom25

You must use the full name of the emoji.
It can be obtained by typing the emoji itself and putting a sign in front of it \.
The full name itself will be of the format:<:имя_эмодзи:id_эмодзи>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question