#π discord bot help
38 messages Β· Page 1 of 1 (latest)
@magic scroll
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.
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?
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
that would be amazing. but i really dont mind if you dont want to. this community has like 50k other people
where is your coinflip command code?
(did you know that there's also a #discord-bots channel and you don't have to go to the #python-discussion everytime)
you know there is a channel for discord bots π
np
let me know if you can help me. it would be great if you could. ive been stuck on this for awhile
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)
https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ui.Button other button object arguments
in order on the photo:
link (url)
success (green)
danger (red)
primary (blurple)
secondary (grey / gray)
button styles
in parenthesis there's aliasses
thanks!
also on the discord.py repo i found working buttons
https://github.com/Rapptz/discord.py/blob/master/examples/views/confirm.py
@magic scroll
What is the issue right now?
i don't think there's an issue rn
ok
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.