discord.js on message edit code example
Example 1: discord.js edit message by id
client.channels.cache.get(channelid).fetchMessage(messageid).then(msg => msg.delete());
Example 2: discord.js how to edit a message
message.channel.send("Beep").then((sentMessage) => sentMessage.edit("Boop!"))