Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js add button to message

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
Source by discordjs.guide #
 
PREVIOUS NEXT
Tagged: #add #button #message
ADD COMMENT
Topic
Name
3+1 =