summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-14 20:16:49 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-14 20:16:49 +0100
commit86700f88abe1ca2d811169316443c5339484b72e (patch)
treebe92e061aa75589d16aa3279365fb0014ed4d0fe
parent:bug: fix PermissionResolvable (diff)
downloadserver-86700f88abe1ca2d811169316443c5339484b72e.tar.xz
:bug: fix public member type
-rw-r--r--dist/models/Event.d.ts2
-rw-r--r--dist/models/Member.d.ts7
-rw-r--r--dist/models/Member.js.map2
-rw-r--r--dist/util/Permissions.js2
-rw-r--r--dist/util/Permissions.js.map2
-rw-r--r--src/models/Event.ts1
-rw-r--r--src/models/Member.ts8
-rw-r--r--src/util/Permissions.ts2
8 files changed, 16 insertions, 10 deletions
diff --git a/dist/models/Event.d.ts b/dist/models/Event.d.ts
index c6049066..2e035b58 100644
--- a/dist/models/Event.d.ts
+++ b/dist/models/Event.d.ts
@@ -351,5 +351,5 @@ export interface InteractionCreateEvent extends Event {
     event: "INTERACTION_CREATE";
     data: Interaction;
 }
-export declare type EVENT = "READY" | "CHANNEL_CREATE" | "CHANNEL_UPDATE" | "CHANNEL_DELETE" | "CHANNEL_PINS_UPDATE" | "GUILD_CREATE" | "GUILD_UPDATE" | "GUILD_DELETE" | "GUILD_BAN_ADD" | "GUILD_BAN_REMOVE" | "GUILD_EMOJI_UPDATE" | "GUILD_INTEGRATIONS_UPDATE" | "GUILD_MEMBER_ADD" | "GUILD_MEMBER_REMOVE" | "GUILD_MEMBER_UPDATE" | "GUILD_MEMBER_AVAILABLE" | "GUILD_MEMBER_SPEAKING" | "GUILD_MEMBERS_CHUNK" | "GUILD_ROLE_CREATE" | "GUILD_ROLE_DELETE" | "GUILD_ROLE_UPDATE" | "INVITE_CREATE" | "INVITE_DELETE" | "MESSAGE_CREATE" | "MESSAGE_UPDATE" | "MESSAGE_DELETE" | "MESSAGE_DELETE_BULK" | "MESSAGE_REACTION_ADD" | "MESSAGE_REACTION_REMOVE" | "MESSAGE_REACTION_REMOVE_ALL" | "MESSAGE_REACTION_REMOVE_EMOJI" | "PRESENCE_UPDATE" | "TYPING_START" | "USER_UPDATE" | "WEBHOOKS_UPDATE" | "INTERACTION_CREATE" | "VOICE_STATE_UPDATE" | "VOICE_SERVER_UPDATE" | "APPLICATION_COMMAND_CREATE" | "APPLICATION_COMMAND_UPDATE" | "APPLICATION_COMMAND_DELETE" | CUSTOMEVENTS;
+export declare type EVENT = "READY" | "CHANNEL_CREATE" | "CHANNEL_UPDATE" | "CHANNEL_DELETE" | "CHANNEL_PINS_UPDATE" | "GUILD_CREATE" | "GUILD_UPDATE" | "GUILD_DELETE" | "GUILD_BAN_ADD" | "GUILD_BAN_REMOVE" | "GUILD_EMOJI_UPDATE" | "GUILD_INTEGRATIONS_UPDATE" | "GUILD_MEMBER_ADD" | "GUILD_MEMBER_REMOVE" | "GUILD_MEMBER_UPDATE" | "GUILD_MEMBER_SPEAKING" | "GUILD_MEMBERS_CHUNK" | "GUILD_ROLE_CREATE" | "GUILD_ROLE_DELETE" | "GUILD_ROLE_UPDATE" | "INVITE_CREATE" | "INVITE_DELETE" | "MESSAGE_CREATE" | "MESSAGE_UPDATE" | "MESSAGE_DELETE" | "MESSAGE_DELETE_BULK" | "MESSAGE_REACTION_ADD" | "MESSAGE_REACTION_REMOVE" | "MESSAGE_REACTION_REMOVE_ALL" | "MESSAGE_REACTION_REMOVE_EMOJI" | "PRESENCE_UPDATE" | "TYPING_START" | "USER_UPDATE" | "WEBHOOKS_UPDATE" | "INTERACTION_CREATE" | "VOICE_STATE_UPDATE" | "VOICE_SERVER_UPDATE" | "APPLICATION_COMMAND_CREATE" | "APPLICATION_COMMAND_UPDATE" | "APPLICATION_COMMAND_DELETE" | CUSTOMEVENTS;
 export declare type CUSTOMEVENTS = "INVALIDATED";
diff --git a/dist/models/Member.d.ts b/dist/models/Member.d.ts
index e4fc1fa7..d04886cf 100644
--- a/dist/models/Member.d.ts
+++ b/dist/models/Member.d.ts
@@ -1,7 +1,7 @@
 /// <reference path="../util/MongoBigInt.d.ts" />
 import { PublicUser } from "./User";
 import { Schema, Document } from "mongoose";
-export interface Member extends Document {
+export interface Member {
     id: bigint;
     guild_id: bigint;
     nick?: string;
@@ -14,6 +14,9 @@ export interface Member extends Document {
     permissions: bigint;
     settings: UserGuildSettings;
 }
+export interface MemberDocument extends Member, Document {
+    id: bigint;
+}
 export interface UserGuildSettings {
     channel_overrides: {
         channel_id: bigint;
@@ -34,7 +37,7 @@ export interface MuteConfig {
     selected_time_window: number;
 }
 export declare const MemberSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>;
-export declare const MemberModel: import("mongoose").Model<Member>;
+export declare const MemberModel: import("mongoose").Model<MemberDocument>;
 export interface PublicMember extends Omit<Member, "settings" | "id"> {
     user: PublicUser;
 }
diff --git a/dist/models/Member.js.map b/dist/models/Member.js.map
index 788f06fc..87db2eab 100644
--- a/dist/models/Member.js.map
+++ b/dist/models/Member.js.map
@@ -1 +1 @@
-{"version":3,"file":"Member.js","sourceRoot":"","sources":["../../src/models/Member.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAqC1D,MAAM,UAAU,GAAG;IAClB,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,MAAM;CAC5B,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,MAAM;IACrB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,gBAAK,CAAC,IAAI;IACvB,QAAQ,EAAE;QACT,iBAAiB,EAAE;YAClB;gBACC,UAAU,EAAE,gBAAK,CAAC,IAAI;gBACtB,qBAAqB,EAAE,MAAM;gBAC7B,WAAW,EAAE,UAAU;gBACvB,KAAK,EAAE,OAAO;aACd;SACD;QACD,qBAAqB,EAAE,MAAM;QAC7B,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,UAAU;QACvB,KAAK,EAAE,OAAO;QACd,iBAAiB,EAAE,OAAO;QAC1B,cAAc,EAAE,OAAO;QACvB,OAAO,EAAE,MAAM;KACf;CACD,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,gBAAK,CAAS,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"Member.js","sourceRoot":"","sources":["../../src/models/Member.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAyC1D,MAAM,UAAU,GAAG;IAClB,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,MAAM;CAC5B,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM;IACjB,aAAa,EAAE,MAAM;IACrB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,gBAAK,CAAC,IAAI;IACvB,QAAQ,EAAE;QACT,iBAAiB,EAAE;YAClB;gBACC,UAAU,EAAE,gBAAK,CAAC,IAAI;gBACtB,qBAAqB,EAAE,MAAM;gBAC7B,WAAW,EAAE,UAAU;gBACvB,KAAK,EAAE,OAAO;aACd;SACD;QACD,qBAAqB,EAAE,MAAM;QAC7B,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,UAAU;QACvB,KAAK,EAAE,OAAO;QACd,iBAAiB,EAAE,OAAO;QAC1B,cAAc,EAAE,OAAO;QACvB,OAAO,EAAE,MAAM;KACf;CACD,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG,gBAAK,CAAiB,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
\ No newline at end of file
diff --git a/dist/util/Permissions.js b/dist/util/Permissions.js
index a62e8a8b..b3176221 100644
--- a/dist/util/Permissions.js
+++ b/dist/util/Permissions.js
@@ -18,7 +18,7 @@ class Permissions extends BitField_1.BitField {
         return (checkAdmin && super.has(Permissions.FLAGS.ADMINISTRATOR)) || super.has(permission);
     }
     static channelPermission(overwrites, init) {
-        // channelOverwrites.filter((x) => x.type === 1 && x.id !== user.id);
+        // TODO: do not deny any permissions if admin
         return overwrites.reduce((permission, overwrite) => {
             // apply disallowed permission
             // * permission: current calculated permission (e.g. 010)
diff --git a/dist/util/Permissions.js.map b/dist/util/Permissions.js.map
index 6bd37eae..b46968d5 100644
--- a/dist/util/Permissions.js.map
+++ b/dist/util/Permissions.js.map
@@ -1 +1 @@
-{"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../../src/util/Permissions.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,8DAA8D;AAC9D,6CAA+C;AAC/C,+CAAkE;AAElE,yCAAiD;AACjD,yCAAsC;AAqCtC,MAAa,WAAY,SAAQ,mBAAQ;IAmCxC,GAAG,CAAC,UAAgC,EAAE,UAAU,GAAG,IAAI;QACtD,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,UAAgC,EAAE,UAAU,GAAG,IAAI;QACtD,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU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C,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,uBAAuB,CAAC,CAAC;KAClF;IAED,IAAI,UAAU,GAAG,WAAW,CAAC,eAAe,CAAC;QAC5C,IAAI,EAAE;YACL,EAAE,EAAE,OAAO;YACX,KAAK,EAAE,MAAM,CAAC,KAAK;SACnB;QACD,KAAK,EAAE;YACN,KAAK,EAAE,KAAK;SACZ;QACD,OAAO,EAAE;YACR,UAAU,EAAE,OAAO,EAAE,qBAAqB;SAC1C;KACD,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACnB,CAAC;AAxBD,sCAwBC"}
\ No newline at end of file
diff --git a/src/models/Event.ts b/src/models/Event.ts
index e8dfe11e..4e2736c0 100644
--- a/src/models/Event.ts
+++ b/src/models/Event.ts
@@ -416,7 +416,6 @@ export type EVENT =
 	| "GUILD_MEMBER_ADD"
 	| "GUILD_MEMBER_REMOVE"
 	| "GUILD_MEMBER_UPDATE"
-	| "GUILD_MEMBER_AVAILABLE"
 	| "GUILD_MEMBER_SPEAKING"
 	| "GUILD_MEMBERS_CHUNK"
 	| "GUILD_ROLE_CREATE"
diff --git a/src/models/Member.ts b/src/models/Member.ts
index dd26782f..c4d3a598 100644
--- a/src/models/Member.ts
+++ b/src/models/Member.ts
@@ -1,7 +1,7 @@
 import { PublicUser } from "./User";
 import { Schema, model, Types, Document } from "mongoose";
 
-export interface Member extends Document {
+export interface Member {
 	id: bigint;
 	guild_id: bigint;
 	nick?: string;
@@ -15,6 +15,10 @@ export interface Member extends Document {
 	settings: UserGuildSettings;
 }
 
+export interface MemberDocument extends Member, Document {
+	id: bigint;
+}
+
 export interface UserGuildSettings {
 	channel_overrides: {
 		channel_id: bigint;
@@ -71,7 +75,7 @@ export const MemberSchema = new Schema({
 	},
 });
 
-export const MemberModel = model<Member>("Member", MemberSchema, "members");
+export const MemberModel = model<MemberDocument>("Member", MemberSchema, "members");
 
 export interface PublicMember extends Omit<Member, "settings" | "id"> {
 	user: PublicUser;
diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts
index c7a3d81f..56540b8f 100644
--- a/src/util/Permissions.ts
+++ b/src/util/Permissions.ts
@@ -88,7 +88,7 @@ export class Permissions extends BitField {
 	}
 
 	static channelPermission(overwrites: ChannelPermissionOverwrite[], init?: bigint) {
-		// channelOverwrites.filter((x) => x.type === 1 && x.id !== user.id);
+		// TODO: do not deny any permissions if admin
 		return overwrites.reduce((permission, overwrite) => {
 			// apply disallowed permission
 			// * permission: current calculated permission (e.g. 010)