/[sudobot]/branches/6.x/src/utils/DiscordBasedPermissionManager.ts
ViewVC logotype

Annotation of /branches/6.x/src/utils/DiscordBasedPermissionManager.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (hide annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File MIME type: application/typescript
File size: 861 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
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     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26