I am update from v4 to v5 and my Code is not working.
I read the Docs and i found no Solution.
My Code:
@i.slash_command(name='server', description='Server Administration')
async def server(ctx: i.SlashContext):
msg = iSM(iSO(label='📰| Nachrichten', value='Nachrichten'),
iSO(label='Test', value='Test'),
custom_id='server_msg', min_values=1, max_values=1)
await ctx.send('**Wähle eine Option aus!**', components=msg)
@i.component_callback('server_msg')
async def my_callback(ctx: i.ComponentContext, options: list[str]):
option = options[0]
if option == 'Nachrichten':
await ctx.send('Danke das du dich dafür entschieden hast!', ephemeral=True)
await ctx.member.add_role(role=role)
TypeError: my_callback() missing 1 required positional argument: 'options'