#πŸ”’ discord bot help

38 messages Β· Page 1 of 1 (latest)

magic scroll
#

hello i need some help integrating buttons to my coinflip command, could someone help me integrate this into my code?

tacit grailBOT
#

@magic scroll

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.

magic scroll
# ripe ivy <@1242464955937193994>

i realllllly dont know much about python, it might be stupid to ask cause its probably really easy but could you try and help me with it?

ripe ivy
#

The only thing I know about discord.py is what I learned during the 2h session of me trying to make a discord bot

#

To learn

#

I mean I could try if I get onto my laptop

magic scroll
magic marsh
#

where is your coinflip command code?

magic scroll
#

let me send you this.

#

@magic marsh at the bottom of the file.

ripe ivy
#

(did you know that there's also a #discord-bots channel and you don't have to go to the #python-discussion everytime)

magic marsh
#

you know there is a channel for discord bots πŸ™‚

magic scroll
#

oh

#

πŸ’€

#

yeah my fault.

magic marsh
#

np

magic scroll
#

let me know if you can help me. it would be great if you could. ive been stuck on this for awhile

ripe ivy
#

i think i got it

#

@magic scroll

#
@client.tree.command()
async def help(interaction: discord.Interaction):

    url_view = discord.ui.View()
    url_view.add_item(discord.ui.Button(label = 'hello', style = discord.ButtonStyle.url, url = 'https://google.com'))

    await interaction.response.send_message('hello', view = url_view)
#

in order on the photo:

link (url)
success (green)
danger (red)
primary (blurple)
secondary (grey / gray)
#

button styles

#

in parenthesis there's aliasses

magic scroll
#

thanks!

ripe ivy
#

🫑

#

if your button has a link it will default to url style and you cnat change it

ripe ivy
#

@magic scroll

primal iris
#

What is the issue right now?

ripe ivy
#

i don't think there's an issue rn

primal iris
#

ok

tacit grailBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.