#Cant link button with a url

1 messages · Page 1 of 1 (latest)

spiral orchid
#

There isnt a callback for a url button

keen merlin
#

oh

spiral orchid
#
view = discord.ui.View()
view.add_item(discord.ui.Button(label='Go to website', url='https://example.com/', style=discord.ButtonStyle.url))
await something.send('Press the button!', view=view)
``` This is a example
keen merlin
#

how do i make it work even after restart bot?

spiral orchid
#

Persistent views

#

ive never worked with it but its in the examples

dense tuskBOT
#

Here's the persistent example.

keen merlin
#

ok

#

thats what i am currently doing

#

but not working with the url arg

#

i think buttons with url work always even if bot offline

#

seems thats why i couldnt do it persistent

#

is that true?

viral garden
#

you can ONLY make url buttons with discord.ui.Button