I'm trying to develop some code that shows the bot when it went online, and let the embed message color change to something else every 2 seconds. (2000ms) But I don't know how, I get an error that says channel.send.edit is not a function
or something along those lines.
What I did was... Create a timeout. Edit the message, but it'll show a different message / output for the uptime section. Delete and send a message.
var myInfo = new discord.RichEmbed()
.setAuthor(`${bot.user.username} is now ONLINE`,`${bot.user.avatarURL}`)
.setDescription(`The bot is now up, please check the following below to see when the bot was online.`)
.addField(`Ready At`,`${bot.readyAt}`,true)
.addField(`Timestamp`,`${bot.readyTimestamp}`,true)
.addField(`Uptime`,`${bot.uptime}`,true)
.setColor(0x008704)
.setFooter('Bot is now online.')
.setThumbnail(`${bot.user.avatarURL}`)
var myInfo2 = new discord.RichEmbed()
.setAuthor(`${bot.user.username} is now ONLINE`,`${bot.user.avatarURL}`)
.setDescription(`The bot is now up, please check the following below to see when the bot was online.`)
.addField(`Ready At`,`${bot.readyAt}`,true)
.addField(`Timestamp`,`${bot.readyTimestamp}`,true)
.addField(`Uptime`,`${bot.uptime}`,true)
.setColor(0x00c13a)
.setFooter('Bot is now online.')
.setThumbnail(`${bot.user.avatarURL}`)
bot.channels.get("523649838693482507").send(myInfo).edit(myInfo2);
I expect the bot when it gets online, it'll send the embed message, then 2 seconds later the bot edits the color, and so on.
The output is a bot giving an error, or just not working at all.