I'm making a discord bot, but I'm getting the error:
Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with
.catch(). (rejection id: 2).
I know something is wrong, but not sure what is it.
client.on('message', message => {
if (message.content === 's!verifymsg') {
const embed = new RichEmbed()
.setTitle('__**VERIFICACIÓN**__')
.setColor(0xFF0000)
.setDescription('¡Para poder ver los demás canales, es necesario que reacciones para verificar! \n- Reacciona con (✅)')
message.channel.send(embed);
}
});
If you type s!verifymsg it sends an embed in that same channel containing some text in that same embed.