Skip to main content

member_roles

Function member_roles 

Source
async fn member_roles(
    ctx: &BotContext,
    guild_id: Id<GuildMarker>,
    user_id: Id<UserMarker>,
) -> Result<Option<Vec<Id<RoleMarker>>>, PreviewError>
Expand description

Fetches the roles of user_id, or None when they are not in the guild.

Why not cached: without the privileged GUILD_MEMBERS intent no event reports a member’s role changes, so a cached entry could never be invalidated.