#๐Ÿ”’ Discord emoji not working in embed (discord bot)

22 messages ยท Page 1 of 1 (latest)

dense sparrowBOT
#

@lyric gate

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lyric gate
#

any help would be very appreciated!

hybrid dagger
#

Hey that looks like my symbol lol

hybrid dagger
rough blade
#

What library are you using?

winter crest
lyric gate
#

dont worry

#

i fixed it

#

having another issue though

little badger
#

wat is it

lyric gate
#

The button on my embed says "interaction failed" after like 10 minutes

#

how do i make it so the button works forever

winter crest
lyric gate
#

I dont know where i would add that in the code

#

lol

winter crest
#

Sum like this works for me

import discord
from discord.ui import View, Button

class MyView(View):
    def __init__(self, *, timeout=180):
        super().__init__(timeout=timeout)
        self.add_item(Button(label="Click Me"))

    async def on_timeout(self):
        for child in self.children:
            child.disabled = True
        await self.message.edit(view=self)

    async def interaction_check(self, interaction: discord.Interaction):
        if interaction.user.id != self.user_id:
            await interaction.response.send_message("This isn't your button!", ephemeral=True)
            return False
        return True
    
    async def start(self, ctx):
      self.message = await ctx.send("This is my view!", view=self)
      self.user_id = ctx.author.id
lyric gate
#

view = discord.ui.View()
select = discord.ui.Select(
placeholder="Make a selection",
options=[
discord.SelectOption(label="BTC", emoji=":bitcoin:"),
discord.SelectOption(label="ETH", emoji=":ethereum:"),
discord.SelectOption(label="LTC", emoji=":litecoin:"),
discord.SelectOption(label="SOL", emoji=":solana:"),
],
custom_id=f"crypto_select_{ctx.author.id}_{int(time.time())}"

#

@winter crest

#

where do i add the timeout to infinite?

dense sparrowBOT
#
Python help channel closed using Discord native close action

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.