#Cant link button with a url
1 messages · Page 1 of 1 (latest)
oh
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
how do i make it work even after restart bot?
Here's the persistent example.
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?
Remove the style
yes, they don't have callbacks because they always link, and as such can't be used with the decorator
you can ONLY make url buttons with discord.ui.Button