Skip to main content

invalidate_guild_roles

Function invalidate_guild_roles 

Source
pub async fn invalidate_guild_roles(guild_id: Id<GuildMarker>)
Expand description

Drops the cached role permissions of guild_id.

A role whose permissions changed would otherwise keep deciding visibility with what it used to be allowed, just as a stale overwrite would (see invalidate_channel). Callers invoke this from the role events and from GUILD_CREATE, which is what a guild looks like again after a reconnect that may have missed role events.