jellyfin-discord-bot/server/helper/role.controller.ts

26 lines
996 B
TypeScript

import { Role, User } from "discord.js";
import { ExtendedClient } from "../structures/client";
export default class RoleController {
constructor(private client: ExtendedClient) { }
private getMediaRoleForGuild(guildId: string): Role {
throw new Error("Method not implemented.");
}
public addRoleToUser(user: User, role: Role, guildId: string, requestId: string) {
throw new Error("Method not implemented.");
}
private removeRoleFromUser(user: User, roleToAdd: any, guildId: string, requestId: string) {
throw new Error("Method not implemented.");
}
public addMediaRoleToUser(user: User, guildId: string, requestId: string) {
const roleToAdd: Role = this.getMediaRoleForGuild(guildId)
return this.addRoleToUser(user, roleToAdd, guildId, requestId)
}
public removeMediaRoleFromUser(user: User, guildId: string, requestId: string) {
const roleToRemove: Role = this.getMediaRoleForGuild(guildId)
return this.removeRoleFromUser(user, roleToRemove, guildId, requestId)
}
}