Как убрать лимит на кнопки в dislash? (discord.py)

Как использовать больше кнопок чем 5 в dislash?

Ошибка:

discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In data.components.0.components.5: The specified component exceeds the maximum width

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

Автор решения: RAINGM

Никак, но можно их делать с новой строки, то есть(макс. кнопок 25, лимит дискорда):

await ctx.send(
    content='test',
    components=[
        ActionRow(
            Button(style=ButtonStyle.grey, label="1", custom_id='1'),
            Button(style=ButtonStyle.grey, label="2", custom_id='2'),
            Button(style=ButtonStyle.grey, label="3", custom_id='3'),
            Button(style=ButtonStyle.grey, label="4", custom_id='4'),
            Button(style=ButtonStyle.grey, label="5", custom_id='5')
        ),
        ActionRow(
            Button(style=ButtonStyle.grey, label="6", custom_id='6'),
            Button(style=ButtonStyle.grey, label="7", custom_id='7'),
            Button(style=ButtonStyle.red, label="8", custom_id='8'),
            Button(style=ButtonStyle.red, label="9", custom_id='9'),
            Button(style=ButtonStyle.red, label="10", custom_id='10')
        ),
        ActionRow(
            Button(style=ButtonStyle.grey, label="11", custom_id='11'),
            Button(style=ButtonStyle.grey, label="12", custom_id='12'),
            Button(style=ButtonStyle.red, label="13", custom_id='13'),
            Button(style=ButtonStyle.red, label="14", custom_id='14'),
            Button(style=ButtonStyle.red, label="15", custom_id='15')
        ),
        ActionRow(
            Button(style=ButtonStyle.grey, label="16", custom_id='16'),
            Button(style=ButtonStyle.grey, label="17", custom_id='17'),
            Button(style=ButtonStyle.red, label="18", custom_id='18'),
            Button(style=ButtonStyle.red, label="19", custom_id='19'),
            Button(style=ButtonStyle.red, label="20", custom_id='20')
        ),
        ActionRow(
            Button(style=ButtonStyle.grey, label="21", custom_id='21'),
            Button(style=ButtonStyle.grey, label="22", custom_id='22'),
            Button(style=ButtonStyle.red, label="23", custom_id='23'),
            Button(style=ButtonStyle.red, label="24", custom_id='24'),
            Button(style=ButtonStyle.red, label="25", custom_id='25')
        )
)
→ Ссылка