#[Bug] This interaction failed

1 messages · Page 1 of 1 (latest)

misty crag
#

Subclassing View would be better

lavish magnet
#

yea but its my first time using pycord and im just testing the buttons

misty crag
#

The issue you mentioned has nothing to do with yours? The issue mentions trying to send an embed without plain text and you're talking about buttons failing

misty crag
#

It's not the best practice

lilac urchinBOT
#

Here's the confirm example.

#

Here's the button roles example.

lavish magnet
#

it's literally my issue

brave kayak
#

Subclass

lavish magnet
#

am i forced to subclassing?

brave kayak
#

No, but it’s highly recommended and you can customize a view easier imo.

lavish magnet
#

ill subclass it but first i need to fix the issue

misty crag
brave kayak
#

You’re not going to find an easy fix unless you’re subclassing.

lavish magnet
#

fine

brave kayak
#

We don’t have to help you, so you should be appreciating the help.

lavish magnet
#
class B1(Button):
    def __init__(self):
        super().__init__(label="Test B")
    async def callback(self, interaction):
        embed=discord.Embed(title="User Identification", description="BBB", color=33023)
        await interaction.response.edit_message(embed=embed)
class B2(Button):
    def __init__(self):
        super().__init__(label="Test C")
    async def callback(self, interaction):
        embed=discord.Embed(title="User Identification", description="CCC", color=33023)
        await interaction.response.edit_message(embed=embed)
buttons_ui = B1()
buttons_ui2 = B2()
view_ui_buttons = View()
view_ui_buttons.add_item(buttons_ui)
view_ui_buttons.add_item(buttons_ui2)
embed=discord.Embed(title="User Identification", description="AAA", color=33023)
await channel.send(embed=embed, view=view_ui_buttons)

I still dont know what's causing the issue

brave kayak
#

Any error?

lavish magnet