Rapptz / discord-ext-menus

MIT License
234 stars 87 forks source link

Cannot add custom emojis to discord.ext.menus #22

Closed aryaniyaps closed 3 years ago

aryaniyaps commented 3 years ago

So I have a custom emojis from my bot's home server. However, I cannot add it as menu buttons like

@menus.button("<:GREEN_TICK_ALFRED:765020197765382174>")
    async def do_confirm(self, payload):
        self.result = True
        self.stop()

    @menus.button("<:RED_TICK_ALFRED:765020214001139743>")
    async def do_deny(self, payload):
        self.result = False
        self.stop()

The syntax for displaying the custom emoji is correct [I tried sending it as a message and it worked] But the reaction cannot be added for custom emoji. The bot has permission to use extenral emojis as well as add reactions, I checked.

Is this a bug or am I doing anything wrong?

aryaniyaps commented 3 years ago

This issue was fixed. The error occured because The inital message wasn't return await sent. I did await send initial msg instead. Idk how that matters but now I know that I have to do it. Thanks.

uKaigo commented 3 years ago

It matters because the menu needs to know which message to react, which is acquired from send_initial_message.