#Help - I cannot use button in slash command
1 messages · Page 1 of 1 (latest)
Ignoring exception in command vorschlag:
Traceback (most recent call last):
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\commands\core.py", line 974, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\Nutzer\Desktop\Luca\Coodingsucht\main.py", line 77, in _vorschlag
await ctx.respond(
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\commands\context.py", line 282, in respond
return await self.interaction.response.send_message(
TypeError: send_message() got an unexpected keyword argument 'components'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\bot.py", line 1088, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\commands\core.py", line 374, in invoke
await injected(ctx)
File "C:\Users\StoeKrafter\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: send_message() got an unexpected keyword argument 'components'
You have to use a View containing your Buttons.
Link: https://guide.pycord.dev/interactions/ui-components/buttons
Learn all about implementing buttons in your Discord Bot using Pycord.
You can find everything in that page. There is a table with Button Styles.
yes i see but there is no example how make a link button
You have to use an extra attribute: url.
Link: https://docs.pycord.dev/en/master/api.html#id17
all right thank you
I already did a URL attribute.
I can't help further without looking at your code.