Hello, so I'm having a problem with my python. What I'm trying to create is a ban command that global bans someone, and can ban someone. I have all that down as It was easy but what is causing me trouble is making a reasons button. So the reason button works as showed in the picture but when I try and configure my reason 1 button it gives me so many errors and I'm not sure how to fix all this. I just need some direction and helping.
#How to add buttons to a embed message.
7 messages · Page 1 of 1 (latest)
I will post my code now.
2024-01-30 18:22:17 ERROR discord.ui.view Ignoring exception in view <BanButtons timeout=180.0 children=3> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='Reasons' emoji=None row=None>
Traceback (most recent call last):
File "C:\Users\NotYo\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ui\view.py", line 427, in _scheduled_task
await item.callback(interaction)
File "c:\Users\NotYo\OneDrive\Desktop\Bots\MSRP\MSRP.py", line 585, in banreasons
AttributeError: 'Interaction' object has no attribute 'edit_original_message'
Is the error
but there's much stuff wrong that I'm not sure how to fix
What I'm trying to achieve is the ban button command yk. And once pressed reason 1 it resends the original /ban command message but changes the REASON to whatever the user pressed