#Get the author of who bumped the server
5 messages · Page 1 of 1 (latest)
[email protected]
Atm got:
if (message.author.bot && message.author.id === "302050872383242240") {
const embed = message.embeds[0];
if (!embed) return;
if (embed.description && embed.description.includes('Bump done!')) {
const mentionMatch = embed.description.match(/<@!?(\d+)>/);
if (mentionMatch) {
const userId = mentionMatch[1];
// @ts-ignore
const user = message.guild.members.cache.get(userId);
console.log(`${user ? user.user.tag : userId} successfully bumped the server!`);
} else {
console.log('Bump done, but could not find who did it.');
}
}
}
It does detect when someone bumps the server but not who did it.
Thanks that solved it!