why can’t i use the regional indicator symbol in discordpy?

The bot sees discord emojis as unicode symbols. The bot needs the symbol, not their name. It cannot react to a message if you tell it that the emoji is :smile:. You need to tell it that the emoji is “😄”, or “🇦” in etc for the letters.

You can get these on the pc, by adding a \ in front of the emoji. Have a look at the attached screenshots.

enter image description here

It does however not work for the numbers. The symbols to use is: ‘1️⃣’, ‘2️⃣’ etc.

One idea to get the emojis is to use print and copy emojis out of the terminal. Do a simple command like and look at the output in the terminal for the emojis you give it. what the terminal prints is what you need to use in your code.

@commands.command()
async def emojiprint(ctx, *, emojis):
    print(emojis)

Here is your code with a small change I made. I tested it seems to be working!

    @commands.command(name="warcaby", aliases=["checkers"])
    async def warcabycmd(self, ctx):
        gracz1 = ctx.author
        gracz2 = ctx.message.mentions[0]
        plansza_start = """(board)"""
        embed=discord.Embed(title=f'Grasz z {gracz2}. Ruch gracza {gracz1}!', description=plansza_start, color=ctx.author.color)
        embed.add_field(name='Instrukcje', value='Wybierz pole, a wybrać pionek, a następnie wybierz, w którą stronę idziesz!')
        msg = await ctx.send(content=None, embed=embed)
        emoji_list = ['🇫', '🇬', '🇭', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣']
        for i in emoji_list:
            await msg.add_reaction(i)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top