Answer the question
In order to leave comments, you need to log in
I'm making a bot in python, I decided to use a new feature with a button, I did everything right, but an error popped up. What to do?
I'm making a bot in python, I decided to use a new feature with a button, I did everything right, but I got the error "object of type Button is not json serializable" Help me decide.
@Bot.event
async def on_message(m):
if m.channel.id == 930870896107860031:
await m.edit(content=m.content,
components=[
Button(style=ButtonStyle.green, label="f")
]
)
response = await bot.wait_for("button_click")
if response.channel:
my_channel = bot.get_channel(931423249210966056)
user = response.author
await my_channel.send("f")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question