This is the code before I edit it when I edit it I got an api error and didn't send the message to created room I want Someone to edit it with 7 seconds not args and automaticlly send the embed message in created room
client.on('messageCreate', async message => {
let msg = message.content.split(' ');
let command = msg[0].toLowerCase();
let args = msg.slice(1);
if (command === "count") {
const i = args.join(" ");
let count = i;
const m = new Discord.MessageEmbed().setTitle(`${count}`);
message.channel.send({embeds: [m]}).then(mes => {;
const counter = setInterval(async function(){
if (count >= 0) {
m.setTitle(`${count}`)
count--;
mes.edit({embeds: [m]}).catch(console.log);
} else {
clearInterval(counter);
}
}, 1000);
}).catch(console.log);
}
})
ok no problem