#button help
1 messages · Page 1 of 1 (latest)
button help
if ephemeral and view.timeout is None:
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'timeout'
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
code
Traceback (most recent call last):
File "C:\Users\w\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ui\view.py", line 425, in _scheduled_task
await item.callback(interaction)
File "C:\Users\w\OneDrive\Desktop\bot\modules\buttons.py", line 50, in lock
await interaction.response.send_message(embed=e, view=None, ephemeral=True)
File "C:\Users\w\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\interactions.py", line 779, in send_message
if ephemeral and view.timeout is None:
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'timeout'
error
error
You can't pass the ephemeral kwarg to an edit response
You can't switch from ephemeral to non-ephemeral or viceversa
it's not
editing
what do u mean
its send_message
where do you see edit
async def lock(self, interaction: discord.Interaction, button: discord.ui.Button):```
wrong server, this isn't the pycord structure; chances are you're using discord.py so you should check with them
...that being said, you can fix it by removing view=None because in pycord the default view is None while in dpy it defaults to MISSING, and the check there is jank so it breaks if you do view=None