I want to react to a user's message after sending a command. I tried changing the position of the code, but it's not working.
let channel = message.member.voice.channel;
if (!channel) {
// This Code was working without using embeds.
// message.reply(`>>> Please join a voice channel`) && message.react('๐')
return message.reply({
embeds: [
new MessageEmbed()
.setColor('#FFA400')
.setDescription(`>>> Please join a voice channel`)
// .message.react('๐')
.setFooter(
`Hey ${message.author.username}`,
message.author.displayAvatarURL({ dynamic: true })
),
],
});
}
Message.react and Message.reply are separate methods. Make sure to put it before your return statement!
if (!channel) {
message.react('๐')
return message.reply({
embeds: [
new MessageEmbed()
.setColor('#FFA400')
.setDescription(`>>> Please join a voice channel`)
.setFooter(
`Hey ${message.author.username}`,
message.author.displayAvatarURL({ dynamic: true })
),
],
});
}