Client.on(guildMemberUpdate) - Check who added the role

Is there a way to check if a user or a bot added a role to a user? I want staff to be unable to self-assign certain roles, and only allow them to be assigned via the bot
2 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
nullopt
nullopt2y ago
DiscordClient.on("guildMemberUpdate", async (oldMember: GuildMember, newMember: GuildMember) => {
// check if the bot assigned the role
}
DiscordClient.on("guildMemberUpdate", async (oldMember: GuildMember, newMember: GuildMember) => {
// check if the bot assigned the role
}
Ah