I'm working on a bot in Discord.js. It should listen for its command being used, delete the message with the command, and post in a separate channel the command message's args.
For example, if I sent the bot -say Stack Overflow is a good place to get help
it will post in the channel #said-and-repeated
'Stack Overflow is a good place to get help'. The problem is it needs to react with two emojis so the users can vote whether it's a good tip or not.
Code:
var textToEcho = args.join(" ");
if(args.length === 0){
message.reply('you need to add a `message` to use this command!!');
} else {
message.delete();
Client.channels.cache.get('where it will send the message').send(textToEcho).then(message => {
message.react("emoji");
message.react("emoji");
}
}
But this doesn't work, and I can't see what's wrong with it. I know that custom emojis need to be written slightly differently, but the bot only reacts with two default emojis: the check and the cross.
emoji
? – PerplexingParadox