Skip to content

My Discord Buttons function cannot identify the command i want it to identify #64

Answered by tintinkung
S4ge-Rites asked this question in Q&A
Discussion options

You must be logged in to vote

@S4ge-Rites try create this in new file
u cant just copy and paste example file from discord.js guide our code doesnt work like the guide one, we read message and args seperately
try read this code and understand:

const { MessageButton, MessageActionRow } = require("discord.js");

module.exports = {
    name: 'test1',
    description: 'random message',
    execute(message, args) 
    {
        const row = new MessageActionRow()
			.addComponents(
            new MessageButton()
                .setLabel("uwu")
                .setCustomId('primary')
                .setLabel('Primary')
                .setStyle('PRIMARY')
                .setDisabled(true)
            );

        message.r…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@tintinkung
Comment options

@S4ge-Rites
Comment options

@tintinkung
Comment options

@S4ge-Rites
Comment options

@tintinkung
Comment options

Comment options

You must be logged in to vote
2 replies
@tintinkung
Comment options

@S4ge-Rites
Comment options

Comment options

You must be logged in to vote
1 reply
@S4ge-Rites
Comment options

Answer selected by S4ge-Rites
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants