I want to send the message.channel.send('Send me after timeout'); only after the message.delete() timeout.
message.channel.send('Send me after timeout');
const Discord = require('discord.js'); module.exports = { name: 'coin', description: 'Toss Coin!', aliases: 'toss', execute(message, args) { message.delete().catch(O_o => {}); const embed = new Discord.MessageEmbed() .setTitle(`${message.author.username}`) .setColor('#6d00c1') .setImage('https://i.pinimg.com/originals/8f/06/04/8f0604aedc34d33d2f41113c312a588d.gif'); message.channel.send(embed) .then(message => { message.delete({ timeout: 4000 })}).catch(O_o => {}); message.channel.send('Send me after timeout'); }, };
This could be done like this:
message.channel.send(embed) .then(message => message.delete({ timeout: 4000 }).then(m => m.channel.send("Send me after timeout"))).catch(O_o => {});
2.1m questions
2.1m answers
60 comments
57.0k users