Object of type Button is not JSON serializable

Хочу начать использовать новые кнопки в discorдля embed, но не разобрался как, ибо вылазит эта ошибка Object of type Button is not JSON serializable. Как это можно исправить?


import json
import sqlite3

import discord
from discord import Colour, Embed, PermissionOverwrite
from discord.ext import commands
from discord_components import *
from discord_interactions import InteractionType


class Clans(commands.Cog):
    def __init__(self, client):
        self.client = client
        global base, cur
        base = sqlite3.connect('discordDesire.db')
        cur = base.cursor()

    @commands.command()
    async def but(self, ctx):
        await ctx.send(
            "Discord Buttuns!",
            components=[
                Button(style=ButtonStyle.red, label="red"),
                Button(style=ButtonStyle.red, label="Red", disabled=True)
            ]
        )

Ответы (0 шт):