3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 02:25:01 +00:00
zeppelin/backend/src/plugins/RoleManager/functions/addRole.ts

8 lines
382 B
TypeScript

import { GuildPluginData } from "knub";
import { RoleManagerPluginType } from "../types";
import { runRoleAssignmentLoop } from "./runRoleAssignmentLoop";
export async function addRole(pluginData: GuildPluginData<RoleManagerPluginType>, userId: string, roleId: string) {
await pluginData.state.roleQueue.addQueueItem(userId, roleId, true);
runRoleAssignmentLoop(pluginData);
}