jellyfin-discord-bot/server/events/guildMemberUpdate.ts

13 lines
461 B
TypeScript
Raw Normal View History

2023-04-15 22:06:35 +02:00
import { GuildMember } from "discord.js"
export const name = 'guildMemberUpdate'
export async function execute(oldMember: GuildMember, newMember: GuildMember) {
try {
console.log(`User ${oldMember.displayName} has been updated`)
console.log(`OldRoles: ${JSON.stringify(oldMember.roles.cache.map(x => x.name))}`)
console.log(`NewRoles: ${JSON.stringify(newMember.roles.cache.map(x => x.name))}`)
} catch (error) {
console.error(error)
}
}