services/role_manager
Classes
Section titled “Classes”DiscordRoleManager
Section titled “DiscordRoleManager”Defined in: services/role_manager.ts:10
Service for managing Discord guild roles programmatically.
Wraps the discord.js guild/role API behind a simple interface used by census functions and promotion logic to assign roles to members.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DiscordRoleManager():
DiscordRoleManager
Returns
Section titled “Returns”Methods
Section titled “Methods”addRoleToUser()
Section titled “addRoleToUser()”addRoleToUser(
guildId,userId,roleName):Promise<void>
Defined in: services/role_manager.ts:39
Adds a named role to a guild member.
Parameters
Section titled “Parameters”guildId
Section titled “guildId”string
Discord guild snowflake ID.
userId
Section titled “userId”string
Discord user snowflake ID.
roleName
Section titled “roleName”string
Exact name of the role to add.
Returns
Section titled “Returns”Promise<void>