edit message from message id discord.js code example
Example: discord.js edit message by id
client.channels.cache.get(channelid).fetchMessage(messageid).then(msg => msg.delete());
client.channels.cache.get(channelid).fetchMessage(messageid).then(msg => msg.delete());