1 |
rakinar2 |
577 |
import { Awaitable, GuildMember, PermissionResolvable } from "discord.js"; |
2 |
|
|
import { GetMemberPermissionInGuildResult } from "../services/PermissionManager"; |
3 |
|
|
import AbstractPermissionManager from "./AbstractPermissionManager"; |
4 |
|
|
|
5 |
|
|
export default class DiscordBasedPermissionManager extends AbstractPermissionManager { |
6 |
|
|
shouldModerate(member: GuildMember, moderator: GuildMember) { |
7 |
|
|
return false; |
8 |
|
|
} |
9 |
|
|
|
10 |
|
|
isImmuneToAutoMod( |
11 |
|
|
member: GuildMember, |
12 |
|
|
permission?: PermissionResolvable | PermissionResolvable[] | undefined |
13 |
|
|
): Awaitable<boolean> { |
14 |
|
|
return false; |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
getMemberPermissions( |
18 |
|
|
member: GuildMember, |
19 |
|
|
mergeWithDiscordPermissions?: boolean | undefined |
20 |
|
|
): GetMemberPermissionInGuildResult { |
21 |
|
|
return { |
22 |
|
|
type: "discord", |
23 |
|
|
permissions: member.permissions |
24 |
|
|
}; |
25 |
|
|
} |
26 |
|
|
} |