ошибка в коде дискорд бота на python

ошибка в коде

весь код небуду, так как он очень долгий, а не работает только команда &test

@client.command()

async def test( ctx ):
    await ctx.send(
        embed=discord.Embed(title="ты програмист??"),
        components=[
            Button(ctyle = ButtonStyle.green, label = "Accept", emoji = "✅"),
            Button(ctyle = ButtonStyle.red, label = "Decline", emoji = "❌"),
            Button(ctyle = ButtonStyle.URL, labed = "YouTube", url = "https://www.youtube.com/c/HowdyhoNet/videos"),
        ]
    )

    response = await client.wait_for( "button_click" )
    if response.channel == ctx.channel:
        if response.component.label == "Accept":
            await response.respond( content = "Great! ?" )
        else:
            await response.respond(
                embed = discord.Embed( title = "Are you sure??"),
                components = [
                    Button(ctyle = ButtonStyle.green, label = "YES"),
                    Button(ctyle = ButtonStyle.red, label = "NO"),
                    Button(ctyle = ButtonStyle.blue, label = "I'll think...", emoji = "?"),
                ]
            )

client.run( TOKENn )

ошибка при команде test

Ignoring exception in command test:
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\bot\bot.py", line 376, in test
    Button(ctyle = ButtonStyle.green, label = "Accept", emoji = "✅"),
TypeError: __init__() got an unexpected keyword argument 'ctyle'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: __init__() got an unexpected keyword argument 'ctyle'

Ответы (1 шт):

Автор решения: RAINGM

У вас ошибка в слове ctyle, правильно style

→ Ссылка