feat: add access control

This commit is contained in:
41666 2021-07-18 01:57:03 -04:00
parent 9c07ff0e54
commit 3f45153b66
47 changed files with 1084 additions and 164 deletions

View file

@ -21,6 +21,13 @@ export type GuildData = {
categories: Category[];
features: Features;
auditLogWebhook: string | null;
accessControl: GuildAccessControl;
};
export type GuildAccessControl = {
allowList: Role['id'][];
blockList: Role['id'][];
blockPending: boolean;
};
export type GuildDataUpdate = Omit<Omit<GuildData, 'features'>, 'id'>;

View file

@ -3,6 +3,7 @@ export enum RoleSafety {
HigherThanBot = 1 << 1,
DangerousPermissions = 1 << 2,
ManagedRole = 1 << 3,
AccessControl = 1 << 4,
}
export type Role = {

View file

@ -11,6 +11,7 @@ export type Member = {
roles: string[];
nick?: string;
user?: DiscordUser;
pending?: boolean;
};
export type RoleypolyUser = {