📜  discord.js 向消息添加按钮 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:08.742000             🧑  作者: Mango

代码示例3
const { MessageActionRow, MessageButton, MessageEmbed } = require('discord.js');

        const row = new MessageActionRow()
            .addComponents(
                new MessageButton()
                    .setCustomId('primary')
                    .setLabel('Primary')
                    .setStyle('PRIMARY'),
            );

        const embed = new MessageEmbed()
            .setColor('#0099ff')
            .setTitle('Some title')
            .setURL('https://discord.js.org')
            .setDescription('Some description here');

        await interaction.reply({ content: 'w', ephemeral: true, embeds: [embed], components: [row] });
 





 
 
 
 
 
 
 

 


1