Search code examples
c#dsharp+

DsharpPlus detect who changed someones role


I am using DsharpPlus to make some form of a guard bot. And I need to detect when the role of a person gets changed. I can do this by using the DiscordClient.GuildMemberUpdated. But I can't get the person who changed the role. Can you tell me how this is done if its even possible.


Solution

  • Your bot needs the proper intents enabled to get this information.

    https://discord.com/developers/docs/topics/gateway#gateway-intents

    Under your Bot settings in https://discord.com/developers/ -- you have to enable "Server Members Intent"