transfervaryt
Picopat
- Katılım
- 18 Ekim 2023
- Mesajlar
- 29
Daha fazla
- Cinsiyet
- Erkek
Merhaba butonda "ctx" argümanını atladığım söyleniyor hatada ama yazdım pek anlamadım yardım edebilirseniz sevinirim.
Hata:
yardım edin
Python:
class kabul(discord.ui.View):
def __init__(self, ctx):
super().__init__(timeout=180)
self.value = None.
self.ctx = ctx.
@discord.ui.button(label="Reddet", style=discord.ButtonStyle.red)
async def reddet(self, button: discord.ui.Button, interaction: discord.Interaction,ctx):
pass
Hata:
Python:
Traceback (most recent call last):
File "C:\Users\-----\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\ext\commands\core.py", line 235, in wrapped.
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\-----\Desktop\-----\-----\-----\-----.py", line 54, in vs.
await ctx.send(embed=aciklama,view=kabul(),view2=ret())
^^^^^^^
TypeError: kabul.__init__() missing 1 required positional argument: 'ctx'.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\-----\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\ext\commands\bot.py", line 1350, in invoke.
await ctx.command.invoke(ctx)
File "C:\Users\-----\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\ext\commands\core.py", line 1029, in invoke.
await injected(*ctx.args, **ctx.kwargs) # type: ignore.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\-----\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\ext\commands\core.py", line 244, in wrapped.
raise CommandInvokeError(exc) from exc.
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: kabul.__init__() missing 1 required positional argument: 'ctx'
yardım edin
Son düzenleme: