@MoneySMile

Почему не работает кнопки в discord.js?

Почему не работает мой код?
Код
const { MessageEmbed } = require('discord.js');
const discord = require('discord.js'); //Define the discord.js module
const client = new discord.Client(); //Creating discord.js client (constructor)
const disbut = require('discord-buttons');
disbut(client);

module.exports.properities = {
    name:["321"]
}

module.exports.run = async (bot,message,member,args) => {
    if(!message.author.id == (292353154111242241))return
			const btn1 = new disbut.MessageButton()
				.setStyle('red')
                .setID(`click`)
				.setLabel('asdasdasdasd') 
				// .setURL('https://npmjs.com/discord-buttons')
				.setDisabled(false); 
				message.channel.send(`RowsTest`, { component: btn1 });

                client.on('clickButton', async (button) => {
                if (button.id == "click") {
                    button.reply.send('On Red Button click', { ephemeral: true });
                }
        })      
}
  • Вопрос задан
  • 77 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы