#Button Error
1 messages · Page 1 of 1 (latest)
okay
its throwing this now
Ignoring exception in view <BtnView timeout=180.0 children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Create' emoji=None row=None>:
Traceback (most recent call last):
File "C:\Users\Dinesh\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
await item.callback(interaction)
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BtnView.callback() takes 2 positional arguments but 3 were given
updated code
ViewClass --> https://carbon.now.sh/j3ujN9rbZyTSMormCw74
..
It's self, button, interaction
it says that the callback takes 2 args but 3 were given
I know what it says.
Thats why I'm telling you the callback is self, button, interaction
Not self, interaction
Ignoring exception in view <BtnView timeout=180.0 children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Create' emoji=None row=None>:
Traceback (most recent call last):
File "C:\Users\Dinesh\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ui\view.py", line 414, in _scheduled_task
await item.callback(interaction)
File "D:\Discord Stuff\Vistara Project\Vistara\visui\embed.py", line 73, in callback
if interaction.user.id != self.ctx.author.id:
^^^^^^^^
AttributeError: 'BtnView' object has no attribute 'ctx'
instead of self.ctx.author.id what can i do ?
aight done