Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some style to interaction button #10064

Closed
Heavyrisem opened this issue Dec 30, 2023 · 1 comment
Closed

add some style to interaction button #10064

Heavyrisem opened this issue Dec 30, 2023 · 1 comment

Comments

@Heavyrisem
Copy link

Which application or package is this feature request for?

discord.js

Feature

in discord.js v13
I can send buttons with new line using MessageActionRow, MessageButton
image

new MessageActionRow().addComponents(
                        new MessageButton()
                            .setStyle('PRIMARY')
                            .setLabel(`${i + 1}: ${V.title.slice(0, 50)} (${V.timestamp})`)
                            .setCustomId(JSON.stringify({ videoId: V.videoId, id: interaction.user.id })),
)

but discordjs v14 MessageActionRow, MessageButton are seems deprecated
and buttons dosen't create new line between them
image``

const buttons = [new ButtonBuilder()
        .setCustomId(String(index))
        .setLabel(
          `${title} - ${artists?.at(0)?.name} - ${formatSecondsToTime(
            duration?.totalSeconds ?? -1,
          )}`,
        )
        .setStyle(ButtonStyle.Primary)];
const row = new ActionRowBuilder<ButtonBuilder>().addComponents(buttons);

Ideal solution or implementation

image

Can discord.js v14 support this feature?

Alternative solutions or implementations

No response

Other context

No response

@Idris1401
Copy link
Contributor

you just need to put a button per row, and not all the buttons in the same row

@discordjs discordjs locked and limited conversation to collaborators Dec 30, 2023
@almostSouji almostSouji converted this issue into discussion #10065 Dec 30, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants