When someone edits a message, post the before and after in #mod-logs with a link to the message
Logs message edits to a configured moderation channel.
When someone edits a message, this creation posts an embed showing:
Setup: Choose a log channel in the settings (e.g., #mod-logs). The creation skips edits where only embeds changed (no actual content difference).
Made by MEE6. Remix it to get a copy of your own and change anything you like.
@Jordan (Jordan)
#general
Game night starts at 7 PM!
Game night starts at 8 PM!
@Alex (Alex)
#general
Bring your favourite board game.
Bring your favourite board game and a snack.
// Message edit logger — posts before/after to a configured channel
mee6.settings({
log_channel: {
type: 'channel',
label: 'Edit log channel',
required: true,
sample: 'mod-logs',
},
});
mee6.on('message_edit', async (ctx) => {
const logChannelId = ctx.settings.log_channel;
if (!logChannelId) {
mee6.log('No log channel configured — skipping edit log');
return;
}
// Skip if content didn't actually change (happens with embed updates)
if (ctx.previousContent === ctx.message.content) {
return;
}
await ctx.send(logChannelId, {
embed: {
title: '✏️ Message Edited',
color: '#f39c12',
fields: [
{
name: 'Author',
value: `${ctx.author.mention} (${ctx.author.username})`,
inline: true,
},
{
name: 'Channel',
value: `<#${ctx.message.channelId}>`,
inline: true,
},
{
name: 'Before',
value: ctx.previousContent || '*[empty]*',
},
{
name: 'After',
value: ctx.message.content || '*[empty]*',
},
],
footer: {
text: `Message ID: ${ctx.message.id}`,
},
url: `https://discord.com/channels/${ctx.guild.id}/${ctx.message.channelId}/${ctx.message.id}`,
},
});
});