diff options
Diffstat (limited to 'dist')
87 files changed, 32 insertions, 1500 deletions
diff --git a/dist/Schema/Activity.d.ts b/dist/Schema/Activity.d.ts deleted file mode 100644 index e5f276d6..00000000 --- a/dist/Schema/Activity.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { EmojiSchema } from "./Emoji"; -export declare const ActivitySchema: { - afk: BooleanConstructor; - status: StringConstructor; - $activities: { - name: StringConstructor; - type: NumberConstructor; - $url: StringConstructor; - $created_at: NumberConstructor; - $timestamps: { - start: NumberConstructor; - end: NumberConstructor; - }; - $application_id: BigIntConstructor; - $details: StringConstructor; - $State: StringConstructor; - $emoji: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; - }; - $party: { - $id: StringConstructor; - $size: NumberConstructor[]; - }; - $assets: { - $large_image: StringConstructor; - $large_text: StringConstructor; - $small_image: StringConstructor; - $small_text: StringConstructor; - }; - $secrets: { - $join: StringConstructor; - $spectate: StringConstructor; - $match: StringConstructor; - }; - $instance: BooleanConstructor; - flags: BigIntConstructor; - }[]; - $since: NumberConstructor; -}; -export interface ActivitySchema { - afk: boolean; - status: string; - activities?: [ - { - name: string; - type: number; - url?: string; - created_at?: number; - timestamps?: { - start: number; - end: number; - }; - application_id?: bigint; - details?: string; - State?: string; - emoji?: EmojiSchema; - party?: { - id?: string; - size?: [number]; - }; - assets?: { - large_image?: string; - large_text?: string; - small_image?: string; - small_text?: string; - }; - secrets?: { - join?: string; - spectate?: string; - match?: string; - }; - instance?: boolean; - flags: bigint; - } - ]; - since?: number; -} diff --git a/dist/Schema/Activity.js b/dist/Schema/Activity.js deleted file mode 100644 index cbca224c..00000000 --- a/dist/Schema/Activity.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ActivitySchema = void 0; -const Emoji_1 = require("./Emoji"); -exports.ActivitySchema = { - afk: Boolean, - status: String, - $activities: [ - { - name: String, - type: Number, - $url: String, - $created_at: Number, - $timestamps: { - // unix timestamps for start and/or end of the game - start: Number, - end: Number, - }, - $application_id: BigInt, - $details: String, - $State: String, - $emoji: Emoji_1.EmojiSchema, - $party: { - $id: String, - $size: [Number], - }, - $assets: { - $large_image: String, - $large_text: String, - $small_image: String, - $small_text: String, - }, - $secrets: { - $join: String, - $spectate: String, - $match: String, - }, - $instance: Boolean, - flags: BigInt, - }, - ], - $since: Number, -}; -//# sourceMappingURL=Activity.js.map \ No newline at end of file diff --git a/dist/Schema/Activity.js.map b/dist/Schema/Activity.js.map deleted file mode 100644 index 587f92a8..00000000 --- a/dist/Schema/Activity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/Schema/Activity.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEzB,QAAA,cAAc,GAAG;IAC7B,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,MAAM;IACd,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE;gBACZ,mDAAmD;gBACnD,KAAK,EAAE,MAAM;gBACb,GAAG,EAAE,MAAM;aACX;YACD,eAAe,EAAE,MAAM;YACvB,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,mBAAW;YACnB,MAAM,EAAE;gBACP,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;aACf;YACD,OAAO,EAAE;gBACR,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,MAAM;gBACnB,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,MAAM;aACnB;YACD,QAAQ,EAAE;gBACT,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,MAAM;gBACjB,MAAM,EAAE,MAAM;aACd;YACD,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,MAAM;SACb;KACD;IACD,MAAM,EAAE,MAAM;CACd,CAAC"} \ No newline at end of file diff --git a/dist/Schema/Emoji.d.ts b/dist/Schema/Emoji.d.ts deleted file mode 100644 index da4770e9..00000000 --- a/dist/Schema/Emoji.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare const EmojiSchema: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; -}; -export interface EmojiSchema { - name: string; - id?: bigint; - animated: Boolean; -} diff --git a/dist/Schema/Emoji.js b/dist/Schema/Emoji.js deleted file mode 100644 index 79213bce..00000000 --- a/dist/Schema/Emoji.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmojiSchema = void 0; -exports.EmojiSchema = { - name: String, - $id: BigInt, - animated: Boolean, -}; -//# sourceMappingURL=Emoji.js.map \ No newline at end of file diff --git a/dist/Schema/Emoji.js.map b/dist/Schema/Emoji.js.map deleted file mode 100644 index ccf29c51..00000000 --- a/dist/Schema/Emoji.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/Schema/Emoji.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,QAAQ,EAAE,OAAO;CACjB,CAAC"} \ No newline at end of file diff --git a/dist/Schema/Guild.d.ts b/dist/Schema/Guild.d.ts deleted file mode 100644 index 42d540ba..00000000 --- a/dist/Schema/Guild.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare const GuildSchema: { - name: StringConstructor; - $region: StringConstructor; -}; -export interface GuildSchema { - name: string; - region?: string; -} diff --git a/dist/Schema/Guild.js b/dist/Schema/Guild.js deleted file mode 100644 index a65b1b19..00000000 --- a/dist/Schema/Guild.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GuildSchema = void 0; -exports.GuildSchema = { - name: String, - $region: String, -}; -//# sourceMappingURL=Guild.js.map \ No newline at end of file diff --git a/dist/Schema/Guild.js.map b/dist/Schema/Guild.js.map deleted file mode 100644 index 43e413b8..00000000 --- a/dist/Schema/Guild.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Guild.js","sourceRoot":"","sources":["../../src/Schema/Guild.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,MAAM;CAcf,CAAC"} \ No newline at end of file diff --git a/dist/Schema/Identify.d.ts b/dist/Schema/Identify.d.ts deleted file mode 100644 index 750f2871..00000000 --- a/dist/Schema/Identify.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ActivitySchema } from "./Activity"; -export declare const IdentifySchema: { - token: StringConstructor; - intents: BigIntConstructor; - $properties: { - $$os: StringConstructor; - $$browser: StringConstructor; - $$device: StringConstructor; - }; - $presence: { - afk: BooleanConstructor; - status: StringConstructor; - $activities: { - name: StringConstructor; - type: NumberConstructor; - $url: StringConstructor; - $created_at: NumberConstructor; - $timestamps: { - start: NumberConstructor; - end: NumberConstructor; - }; - $application_id: BigIntConstructor; - $details: StringConstructor; - $State: StringConstructor; - $emoji: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; - }; - $party: { - $id: StringConstructor; - $size: NumberConstructor[]; - }; - $assets: { - $large_image: StringConstructor; - $large_text: StringConstructor; - $small_image: StringConstructor; - $small_text: StringConstructor; - }; - $secrets: { - $join: StringConstructor; - $spectate: StringConstructor; - $match: StringConstructor; - }; - $instance: BooleanConstructor; - flags: BigIntConstructor; - }[]; - $since: NumberConstructor; - }; - $compress: BooleanConstructor; - $large_threshold: NumberConstructor; - $shard: NumberConstructor[]; - $guild_subscriptions: BooleanConstructor; -}; -export interface IdentifySchema { - token: string; - properties: { - $$os: string; - $$browser: string; - $$device: string; - }; - intents: bigint; - presence?: ActivitySchema; - compress?: boolean; - large_threshold?: number; - shard?: [number]; - guild_subscriptions?: boolean; -} diff --git a/dist/Schema/Identify.js b/dist/Schema/Identify.js deleted file mode 100644 index 3cc343c8..00000000 --- a/dist/Schema/Identify.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentifySchema = void 0; -const Activity_1 = require("./Activity"); -exports.IdentifySchema = { - token: String, - intents: BigInt, - $properties: { - // bruh discord really uses $ in the property key, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key - $$os: String, - $$browser: String, - $$device: String, - }, - $presence: Activity_1.ActivitySchema, - $compress: Boolean, - $large_threshold: Number, - $shard: [Number], - $guild_subscriptions: Boolean, -}; -//# sourceMappingURL=Identify.js.map \ No newline at end of file diff --git a/dist/Schema/Identify.js.map b/dist/Schema/Identify.js.map deleted file mode 100644 index 857fd9c1..00000000 --- a/dist/Schema/Identify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Identify.js","sourceRoot":"","sources":["../../src/Schema/Identify.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAE/B,QAAA,cAAc,GAAG;IAC7B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,MAAM;IACf,WAAW,EAAE;QACZ,yIAAyI;QACzI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,MAAM;KAChB;IACD,SAAS,EAAE,yBAAc;IACzB,SAAS,EAAE,OAAO;IAClB,gBAAgB,EAAE,MAAM;IACxB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,oBAAoB,EAAE,OAAO;CAC7B,CAAC"} \ No newline at end of file diff --git a/dist/gateway/src/schema/Activity.d.ts b/dist/gateway/src/schema/Activity.d.ts deleted file mode 100644 index e5f276d6..00000000 --- a/dist/gateway/src/schema/Activity.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { EmojiSchema } from "./Emoji"; -export declare const ActivitySchema: { - afk: BooleanConstructor; - status: StringConstructor; - $activities: { - name: StringConstructor; - type: NumberConstructor; - $url: StringConstructor; - $created_at: NumberConstructor; - $timestamps: { - start: NumberConstructor; - end: NumberConstructor; - }; - $application_id: BigIntConstructor; - $details: StringConstructor; - $State: StringConstructor; - $emoji: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; - }; - $party: { - $id: StringConstructor; - $size: NumberConstructor[]; - }; - $assets: { - $large_image: StringConstructor; - $large_text: StringConstructor; - $small_image: StringConstructor; - $small_text: StringConstructor; - }; - $secrets: { - $join: StringConstructor; - $spectate: StringConstructor; - $match: StringConstructor; - }; - $instance: BooleanConstructor; - flags: BigIntConstructor; - }[]; - $since: NumberConstructor; -}; -export interface ActivitySchema { - afk: boolean; - status: string; - activities?: [ - { - name: string; - type: number; - url?: string; - created_at?: number; - timestamps?: { - start: number; - end: number; - }; - application_id?: bigint; - details?: string; - State?: string; - emoji?: EmojiSchema; - party?: { - id?: string; - size?: [number]; - }; - assets?: { - large_image?: string; - large_text?: string; - small_image?: string; - small_text?: string; - }; - secrets?: { - join?: string; - spectate?: string; - match?: string; - }; - instance?: boolean; - flags: bigint; - } - ]; - since?: number; -} diff --git a/dist/gateway/src/schema/Activity.js b/dist/gateway/src/schema/Activity.js deleted file mode 100644 index cbca224c..00000000 --- a/dist/gateway/src/schema/Activity.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ActivitySchema = void 0; -const Emoji_1 = require("./Emoji"); -exports.ActivitySchema = { - afk: Boolean, - status: String, - $activities: [ - { - name: String, - type: Number, - $url: String, - $created_at: Number, - $timestamps: { - // unix timestamps for start and/or end of the game - start: Number, - end: Number, - }, - $application_id: BigInt, - $details: String, - $State: String, - $emoji: Emoji_1.EmojiSchema, - $party: { - $id: String, - $size: [Number], - }, - $assets: { - $large_image: String, - $large_text: String, - $small_image: String, - $small_text: String, - }, - $secrets: { - $join: String, - $spectate: String, - $match: String, - }, - $instance: Boolean, - flags: BigInt, - }, - ], - $since: Number, -}; -//# sourceMappingURL=Activity.js.map \ No newline at end of file diff --git a/dist/gateway/src/schema/Activity.js.map b/dist/gateway/src/schema/Activity.js.map deleted file mode 100644 index da873ecc..00000000 --- a/dist/gateway/src/schema/Activity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../../../../gateway/src/schema/Activity.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEzB,QAAA,cAAc,GAAG;IAC7B,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,MAAM;IACd,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE;gBACZ,mDAAmD;gBACnD,KAAK,EAAE,MAAM;gBACb,GAAG,EAAE,MAAM;aACX;YACD,eAAe,EAAE,MAAM;YACvB,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,mBAAW;YACnB,MAAM,EAAE;gBACP,GAAG,EAAE,MAAM;gBACX,KAAK,EAAE,CAAC,MAAM,CAAC;aACf;YACD,OAAO,EAAE;gBACR,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,MAAM;gBACnB,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,MAAM;aACnB;YACD,QAAQ,EAAE;gBACT,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,MAAM;gBACjB,MAAM,EAAE,MAAM;aACd;YACD,SAAS,EAAE,OAAO;YAClB,KAAK,EAAE,MAAM;SACb;KACD;IACD,MAAM,EAAE,MAAM;CACd,CAAC"} \ No newline at end of file diff --git a/dist/gateway/src/schema/Emoji.d.ts b/dist/gateway/src/schema/Emoji.d.ts deleted file mode 100644 index da4770e9..00000000 --- a/dist/gateway/src/schema/Emoji.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare const EmojiSchema: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; -}; -export interface EmojiSchema { - name: string; - id?: bigint; - animated: Boolean; -} diff --git a/dist/gateway/src/schema/Emoji.js b/dist/gateway/src/schema/Emoji.js deleted file mode 100644 index 79213bce..00000000 --- a/dist/gateway/src/schema/Emoji.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmojiSchema = void 0; -exports.EmojiSchema = { - name: String, - $id: BigInt, - animated: Boolean, -}; -//# sourceMappingURL=Emoji.js.map \ No newline at end of file diff --git a/dist/gateway/src/schema/Emoji.js.map b/dist/gateway/src/schema/Emoji.js.map deleted file mode 100644 index 5e53526e..00000000 --- a/dist/gateway/src/schema/Emoji.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../../../../gateway/src/schema/Emoji.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,QAAQ,EAAE,OAAO;CACjB,CAAC"} \ No newline at end of file diff --git a/dist/gateway/src/schema/Identify.d.ts b/dist/gateway/src/schema/Identify.d.ts deleted file mode 100644 index 750f2871..00000000 --- a/dist/gateway/src/schema/Identify.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ActivitySchema } from "./Activity"; -export declare const IdentifySchema: { - token: StringConstructor; - intents: BigIntConstructor; - $properties: { - $$os: StringConstructor; - $$browser: StringConstructor; - $$device: StringConstructor; - }; - $presence: { - afk: BooleanConstructor; - status: StringConstructor; - $activities: { - name: StringConstructor; - type: NumberConstructor; - $url: StringConstructor; - $created_at: NumberConstructor; - $timestamps: { - start: NumberConstructor; - end: NumberConstructor; - }; - $application_id: BigIntConstructor; - $details: StringConstructor; - $State: StringConstructor; - $emoji: { - name: StringConstructor; - $id: BigIntConstructor; - animated: BooleanConstructor; - }; - $party: { - $id: StringConstructor; - $size: NumberConstructor[]; - }; - $assets: { - $large_image: StringConstructor; - $large_text: StringConstructor; - $small_image: StringConstructor; - $small_text: StringConstructor; - }; - $secrets: { - $join: StringConstructor; - $spectate: StringConstructor; - $match: StringConstructor; - }; - $instance: BooleanConstructor; - flags: BigIntConstructor; - }[]; - $since: NumberConstructor; - }; - $compress: BooleanConstructor; - $large_threshold: NumberConstructor; - $shard: NumberConstructor[]; - $guild_subscriptions: BooleanConstructor; -}; -export interface IdentifySchema { - token: string; - properties: { - $$os: string; - $$browser: string; - $$device: string; - }; - intents: bigint; - presence?: ActivitySchema; - compress?: boolean; - large_threshold?: number; - shard?: [number]; - guild_subscriptions?: boolean; -} diff --git a/dist/gateway/src/schema/Identify.js b/dist/gateway/src/schema/Identify.js deleted file mode 100644 index 3cc343c8..00000000 --- a/dist/gateway/src/schema/Identify.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentifySchema = void 0; -const Activity_1 = require("./Activity"); -exports.IdentifySchema = { - token: String, - intents: BigInt, - $properties: { - // bruh discord really uses $ in the property key, so we need to double prefix it, because instanceOf treats $ (prefix) as a optional key - $$os: String, - $$browser: String, - $$device: String, - }, - $presence: Activity_1.ActivitySchema, - $compress: Boolean, - $large_threshold: Number, - $shard: [Number], - $guild_subscriptions: Boolean, -}; -//# sourceMappingURL=Identify.js.map \ No newline at end of file diff --git a/dist/gateway/src/schema/Identify.js.map b/dist/gateway/src/schema/Identify.js.map deleted file mode 100644 index b0389550..00000000 --- a/dist/gateway/src/schema/Identify.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Identify.js","sourceRoot":"","sources":["../../../../../gateway/src/schema/Identify.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAE/B,QAAA,cAAc,GAAG;IAC7B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,MAAM;IACf,WAAW,EAAE;QACZ,yIAAyI;QACzI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,MAAM;KAChB;IACD,SAAS,EAAE,yBAAc;IACzB,SAAS,EAAE,OAAO;IAClB,gBAAgB,EAAE,MAAM;IACxB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,oBAAoB,EAAE,OAAO;CAC7B,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/index.d.ts b/dist/server-util/src/index.d.ts deleted file mode 100644 index f6968189..00000000 --- a/dist/server-util/src/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { checkToken } from "./util/checkToken"; -import Config, { DefaultOptions } from "./util/Config"; -import db from "./util/Database"; -import * as Constants from "./util/Constants"; -import { Channel } from "./models/Channel"; -import { Emoji } from "./models/Emoji"; -import { Guild } from "./models/Guild"; -import { Event } from "./models/Event"; -import { Invite } from "./models/Invite"; -import { Member } from "./models/Member"; -import { Role } from "./models/Role"; -import { User } from "./models/User"; -import { trimSpecial } from "./util/String"; -import { BitField } from "./util/BitField"; -import { Intents } from "./util/Intents"; -import { MessageFlags } from "./util/MessageFlags"; -import { Permissions } from "./util/Permissions"; -import { Snowflake } from "./util/Snowflake"; -import { UserFlags } from "./util/UserFlags"; -export { trimSpecial, checkToken, Config, Constants, db, BitField, DefaultOptions, Permissions, MessageFlags, UserFlags, Snowflake, Intents, Channel, Event, Emoji, Guild, Invite, Member, Role, User, }; diff --git a/dist/server-util/src/index.js b/dist/server-util/src/index.js deleted file mode 100644 index 80fdef3b..00000000 --- a/dist/server-util/src/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Intents = exports.Snowflake = exports.UserFlags = exports.MessageFlags = exports.Permissions = exports.DefaultOptions = exports.BitField = exports.db = exports.Constants = exports.Config = exports.checkToken = exports.trimSpecial = void 0; -const checkToken_1 = require("./util/checkToken"); -Object.defineProperty(exports, "checkToken", { enumerable: true, get: function () { return checkToken_1.checkToken; } }); -const Config_1 = __importStar(require("./util/Config")); -exports.Config = Config_1.default; -Object.defineProperty(exports, "DefaultOptions", { enumerable: true, get: function () { return Config_1.DefaultOptions; } }); -const Database_1 = __importDefault(require("./util/Database")); -exports.db = Database_1.default; -const Constants = __importStar(require("./util/Constants")); -exports.Constants = Constants; -const String_1 = require("./util/String"); -Object.defineProperty(exports, "trimSpecial", { enumerable: true, get: function () { return String_1.trimSpecial; } }); -const BitField_1 = require("./util/BitField"); -Object.defineProperty(exports, "BitField", { enumerable: true, get: function () { return BitField_1.BitField; } }); -const Intents_1 = require("./util/Intents"); -Object.defineProperty(exports, "Intents", { enumerable: true, get: function () { return Intents_1.Intents; } }); -const MessageFlags_1 = require("./util/MessageFlags"); -Object.defineProperty(exports, "MessageFlags", { enumerable: true, get: function () { return MessageFlags_1.MessageFlags; } }); -const Permissions_1 = require("./util/Permissions"); -Object.defineProperty(exports, "Permissions", { enumerable: true, get: function () { return Permissions_1.Permissions; } }); -const Snowflake_1 = require("./util/Snowflake"); -Object.defineProperty(exports, "Snowflake", { enumerable: true, get: function () { return Snowflake_1.Snowflake; } }); -const UserFlags_1 = require("./util/UserFlags"); -Object.defineProperty(exports, "UserFlags", { enumerable: true, get: function () { return UserFlags_1.UserFlags; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/server-util/src/index.js.map b/dist/server-util/src/index.js.map deleted file mode 100644 index 92b0fb97..00000000 --- a/dist/server-util/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA+C;AAwB9C,2FAxBQ,uBAAU,OAwBR;AAvBX,wDAAuD;AAwBtD,iBAxBM,gBAAM,CAwBN;AAIN,+FA5BgB,uBAAc,OA4BhB;AA3Bf,+DAAiC;AAyBhC,aAzBM,kBAAE,CAyBN;AAvBH,4DAA8C;AAsB7C,8BAAS;AAZV,0CAA4C;AAS3C,4FATQ,oBAAW,OASR;AARZ,8CAA2C;AAa1C,yFAbQ,mBAAQ,OAaR;AAZT,4CAAyC;AAkBxC,wFAlBQ,iBAAO,OAkBR;AAjBR,sDAAmD;AAclD,6FAdQ,2BAAY,OAcR;AAbb,oDAAiD;AAYhD,4FAZQ,yBAAW,OAYR;AAXZ,gDAA6C;AAc5C,0FAdQ,qBAAS,OAcR;AAbV,gDAA6C;AAY5C,0FAZQ,qBAAS,OAYR"} \ No newline at end of file diff --git a/dist/server-util/src/models/Channel.d.ts b/dist/server-util/src/models/Channel.d.ts deleted file mode 100644 index f19071ef..00000000 --- a/dist/server-util/src/models/Channel.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface Channel { - id: bigint; - guild_id: bigint; - last_message_id: string; - last_pin_timestamp: string; - name: string; - nsfw: boolean; - parent_id: bigint; - position: number; - rate_limit_per_user: number; - topic: string | null; - type: number; - permission_overwrites: { - allow: bigint; - deny: bigint; - id: bigint; - type: number; - }[]; -} diff --git a/dist/server-util/src/models/Channel.js b/dist/server-util/src/models/Channel.js deleted file mode 100644 index 5d719d95..00000000 --- a/dist/server-util/src/models/Channel.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Channel.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Channel.js.map b/dist/server-util/src/models/Channel.js.map deleted file mode 100644 index 4c63d20c..00000000 --- a/dist/server-util/src/models/Channel.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../../../src/models/Channel.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/Emoji.d.ts b/dist/server-util/src/models/Emoji.d.ts deleted file mode 100644 index e2f639db..00000000 --- a/dist/server-util/src/models/Emoji.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface Emoji { - allNamesString: string; - animated: boolean; - available: boolean; - guildId: bigint; - id: bigint; - managed: boolean; - name: string; - require_colons: boolean; - url: string; - roles: []; -} diff --git a/dist/server-util/src/models/Emoji.js b/dist/server-util/src/models/Emoji.js deleted file mode 100644 index f4bbad78..00000000 --- a/dist/server-util/src/models/Emoji.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Emoji.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Emoji.js.map b/dist/server-util/src/models/Emoji.js.map deleted file mode 100644 index 5e9e45be..00000000 --- a/dist/server-util/src/models/Emoji.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../../../src/models/Emoji.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/Event.d.ts b/dist/server-util/src/models/Event.d.ts deleted file mode 100644 index a86f3c07..00000000 --- a/dist/server-util/src/models/Event.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface Event { - guild_id?: bigint; - user_id?: bigint; - channel_id?: bigint; - created_at: number; - data: any; - event: string; -} diff --git a/dist/server-util/src/models/Event.js b/dist/server-util/src/models/Event.js deleted file mode 100644 index 5a8077b3..00000000 --- a/dist/server-util/src/models/Event.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// located in collection events -//# sourceMappingURL=Event.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Event.js.map b/dist/server-util/src/models/Event.js.map deleted file mode 100644 index 30e17cb4..00000000 --- a/dist/server-util/src/models/Event.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../../src/models/Event.ts"],"names":[],"mappings":";;AASA,+BAA+B"} \ No newline at end of file diff --git a/dist/server-util/src/models/Guild.d.ts b/dist/server-util/src/models/Guild.d.ts deleted file mode 100644 index 4bf9a831..00000000 --- a/dist/server-util/src/models/Guild.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Channel } from "./Channel"; -import { Emoji } from "./Emoji"; -import { Member } from "./Member"; -import { Role } from "./Role"; -export interface Guild { - afk_channel_id?: bigint; - afk_timeout?: number; - application_id?: bigint; - banner?: string; - channels: Channel[]; - default_message_notifications?: number; - description?: string; - discovery_splash?: string; - emojis: Emoji[]; - explicit_content_filter?: number; - features: []; - icon?: string; - id: bigint; - large?: boolean; - max_members?: number; - max_presences?: number; - max_video_channel_users?: number; - member_count?: number; - presence_count?: number; - members?: Member[]; - mfa_level?: number; - name: string; - owner_id: bigint; - preferred_locale?: string; - premium_subscription_count?: number; - premium_tier?: number; - presences: []; - public_updates_channel_id?: bigint; - region?: string; - roles: Role[]; - rules_channel_id?: bigint; - splash?: string; - system_channel_flags?: number; - system_channel_id?: bigint; - unavailable?: boolean; - vanity_url_code?: string; - verification_level?: number; - voice_states: []; - welcome_screen: []; - widget_channel_id?: bigint; - widget_enabled?: boolean; -} diff --git a/dist/server-util/src/models/Guild.js b/dist/server-util/src/models/Guild.js deleted file mode 100644 index 6c1c7bc5..00000000 --- a/dist/server-util/src/models/Guild.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Guild.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Guild.js.map b/dist/server-util/src/models/Guild.js.map deleted file mode 100644 index c45ef542..00000000 --- a/dist/server-util/src/models/Guild.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Guild.js","sourceRoot":"","sources":["../../../../src/models/Guild.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/Invite.d.ts b/dist/server-util/src/models/Invite.d.ts deleted file mode 100644 index e68886c6..00000000 --- a/dist/server-util/src/models/Invite.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export interface Invite { - code: string; - guild: { - id: bigint; - name: string; - splash: string; - description: string; - icon: string; - features: Object; - verification_level: number; - }; - channel: { - id: bigint; - name: string; - type: number; - }; - inviter: { - id: bigint; - username: string; - avatar: string; - discriminator: number; - }; - target_user: { - id: bigint; - username: string; - avatar: string; - discriminator: number; - }; - target_user_type: number; -} diff --git a/dist/server-util/src/models/Invite.js b/dist/server-util/src/models/Invite.js deleted file mode 100644 index ff9594fe..00000000 --- a/dist/server-util/src/models/Invite.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Invite.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Invite.js.map b/dist/server-util/src/models/Invite.js.map deleted file mode 100644 index 35c8d115..00000000 --- a/dist/server-util/src/models/Invite.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Invite.js","sourceRoot":"","sources":["../../../../src/models/Invite.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/Member.d.ts b/dist/server-util/src/models/Member.d.ts deleted file mode 100644 index 0ccdd5fe..00000000 --- a/dist/server-util/src/models/Member.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Role } from "./Role"; -import { User } from "./User"; -export interface Member { - user: User; - nick: string; - roles: Role[]; - joined_at: number; - premium_since: number; - deaf: boolean; - mute: boolean; - pending: boolean; - permissions: string; -} diff --git a/dist/server-util/src/models/Member.js b/dist/server-util/src/models/Member.js deleted file mode 100644 index 0a75bf46..00000000 --- a/dist/server-util/src/models/Member.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Member.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Member.js.map b/dist/server-util/src/models/Member.js.map deleted file mode 100644 index e6b97284..00000000 --- a/dist/server-util/src/models/Member.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Member.js","sourceRoot":"","sources":["../../../../src/models/Member.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/Role.d.ts b/dist/server-util/src/models/Role.d.ts deleted file mode 100644 index 11582893..00000000 --- a/dist/server-util/src/models/Role.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface Role { - id: bigint; - color: number; - hoist: boolean; - managed: boolean; - mentionable: boolean; - name: string; - permissions: bigint; - position: number; - tags?: { - bot_id?: bigint; - }; -} diff --git a/dist/server-util/src/models/Role.js b/dist/server-util/src/models/Role.js deleted file mode 100644 index 467f4294..00000000 --- a/dist/server-util/src/models/Role.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=Role.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/Role.js.map b/dist/server-util/src/models/Role.js.map deleted file mode 100644 index de99b545..00000000 --- a/dist/server-util/src/models/Role.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../../src/models/Role.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/models/User.d.ts b/dist/server-util/src/models/User.d.ts deleted file mode 100644 index 5e86a8a3..00000000 --- a/dist/server-util/src/models/User.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -export interface User { - id: bigint; - username: string; - discriminator: string; - avatar: string | null; - bot: boolean; - system: boolean; - mfa_enabled: boolean; - created_at: number; - verified: boolean; - email: string; - flags: bigint; - hash: string; - valid_tokens_since: number; - user_settings: UserSettings; - guilds: bigint[]; -} -export interface UserSettings { - afk_timeout: number; - allow_accessibility_detection: boolean; - animate_emoji: boolean; - animate_stickers: number; - contact_sync_enabled: boolean; - convert_emoticons: boolean; - custom_status: { - emoji_id: bigint | null; - emoji_name: string | null; - expires_at: number | null; - text: string | null; - }; - default_guilds_restricted: boolean; - detect_platform_accounts: boolean; - developer_mode: boolean; - disable_games_tab: boolean; - enable_tts_command: boolean; - explicit_content_filter: number; - friend_source_flags: { - all: boolean; - }; - gif_auto_play: boolean; - guild_folders: { - color: number; - guild_ids: bigint[]; - id: number; - name: string; - }[]; - guild_positions: bigint[]; - inline_attachment_media: boolean; - inline_embed_media: boolean; - locale: string; - message_display_compact: boolean; - native_phone_integration_enabled: boolean; - render_embeds: boolean; - render_reactions: boolean; - restricted_guilds: bigint[]; - show_current_game: boolean; - status: "online" | "offline" | "dnd" | "idle"; - stream_notifications_enabled: boolean; - theme: "dark" | "white"; - timezone_offset: number; -} diff --git a/dist/server-util/src/models/User.js b/dist/server-util/src/models/User.js deleted file mode 100644 index 9da5871e..00000000 --- a/dist/server-util/src/models/User.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=User.js.map \ No newline at end of file diff --git a/dist/server-util/src/models/User.js.map b/dist/server-util/src/models/User.js.map deleted file mode 100644 index fa1f1259..00000000 --- a/dist/server-util/src/models/User.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/User.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/server-util/src/util/BitField.d.ts b/dist/server-util/src/util/BitField.d.ts deleted file mode 100644 index 1b08c1f8..00000000 --- a/dist/server-util/src/util/BitField.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -export declare type BitFieldResolvable = number | BigInt | BitField | string | BitFieldResolvable[]; -/** - * Data structure that makes it easy to interact with a bitfield. - */ -export declare class BitField { - bitfield: bigint; - static FLAGS: Record<string, bigint>; - constructor(bits?: BitFieldResolvable); - /** - * Checks whether the bitfield has a bit, or any of multiple bits. - */ - any(bit: BitFieldResolvable): boolean; - /** - * Checks if this bitfield equals another - */ - equals(bit: BitFieldResolvable): boolean; - /** - * Checks whether the bitfield has a bit, or multiple bits. - */ - has(bit: BitFieldResolvable): boolean; - /** - * Gets all given bits that are missing from the bitfield. - */ - missing(bits: BitFieldResolvable): BitFieldResolvable[]; - /** - * Freezes these bits, making them immutable. - */ - freeze(): Readonly<BitField>; - /** - * Adds bits to these ones. - * @param {...BitFieldResolvable} [bits] Bits to add - * @returns {BitField} These bits or new BitField if the instance is frozen. - */ - add(...bits: BitFieldResolvable[]): BitField; - /** - * Removes bits from these. - * @param {...BitFieldResolvable} [bits] Bits to remove - */ - remove(...bits: BitFieldResolvable[]): BitField; - /** - * Gets an object mapping field names to a {@link boolean} indicating whether the - * bit is available. - * @param {...*} hasParams Additional parameters for the has method, if any - */ - serialize(): Record<string, boolean>; - /** - * Gets an {@link Array} of bitfield names based on the bits available. - */ - toArray(): string[]; - toJSON(): bigint; - valueOf(): bigint; - [Symbol.iterator](): Generator<string, void, undefined>; - /** - * Data that can be resolved to give a bitfield. This can be: - * * A bit number (this can be a number literal or a value taken from {@link BitField.FLAGS}) - * * An instance of BitField - * * An Array of BitFieldResolvable - * @typedef {number|BitField|BitFieldResolvable[]} BitFieldResolvable - */ - /** - * Resolves bitfields to their numeric form. - * @param {BitFieldResolvable} [bit=0] - bit(s) to resolve - * @returns {number} - */ - static resolve(bit?: BitFieldResolvable): bigint; -} diff --git a/dist/server-util/src/util/BitField.js b/dist/server-util/src/util/BitField.js deleted file mode 100644 index 97d76f3a..00000000 --- a/dist/server-util/src/util/BitField.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BitField = void 0; -/** - * Data structure that makes it easy to interact with a bitfield. - */ -class BitField { - constructor(bits = 0) { - this.bitfield = BigInt(0); - this.bitfield = BitField.resolve(bits); - } - /** - * Checks whether the bitfield has a bit, or any of multiple bits. - */ - any(bit) { - return (this.bitfield & BitField.resolve(bit)) !== 0n; - } - /** - * Checks if this bitfield equals another - */ - equals(bit) { - return this.bitfield === BitField.resolve(bit); - } - /** - * Checks whether the bitfield has a bit, or multiple bits. - */ - has(bit) { - if (Array.isArray(bit)) - return bit.every((p) => this.has(p)); - const BIT = BitField.resolve(bit); - return (this.bitfield & BIT) === BIT; - } - /** - * Gets all given bits that are missing from the bitfield. - */ - missing(bits) { - if (!Array.isArray(bits)) - bits = new BitField(bits).toArray(); - return bits.filter((p) => !this.has(p)); - } - /** - * Freezes these bits, making them immutable. - */ - freeze() { - return Object.freeze(this); - } - /** - * Adds bits to these ones. - * @param {...BitFieldResolvable} [bits] Bits to add - * @returns {BitField} These bits or new BitField if the instance is frozen. - */ - add(...bits) { - let total = 0n; - for (const bit of bits) { - total |= BitField.resolve(bit); - } - if (Object.isFrozen(this)) - return new BitField(this.bitfield | total); - this.bitfield |= total; - return this; - } - /** - * Removes bits from these. - * @param {...BitFieldResolvable} [bits] Bits to remove - */ - remove(...bits) { - let total = 0n; - for (const bit of bits) { - total |= BitField.resolve(bit); - } - if (Object.isFrozen(this)) - return new BitField(this.bitfield & ~total); - this.bitfield &= ~total; - return this; - } - /** - * Gets an object mapping field names to a {@link boolean} indicating whether the - * bit is available. - * @param {...*} hasParams Additional parameters for the has method, if any - */ - serialize() { - const serialized = {}; - for (const [flag, bit] of Object.entries(BitField.FLAGS)) - serialized[flag] = this.has(bit); - return serialized; - } - /** - * Gets an {@link Array} of bitfield names based on the bits available. - */ - toArray() { - return Object.keys(BitField.FLAGS).filter((bit) => this.has(bit)); - } - toJSON() { - return this.bitfield; - } - valueOf() { - return this.bitfield; - } - *[Symbol.iterator]() { - yield* this.toArray(); - } - /** - * Data that can be resolved to give a bitfield. This can be: - * * A bit number (this can be a number literal or a value taken from {@link BitField.FLAGS}) - * * An instance of BitField - * * An Array of BitFieldResolvable - * @typedef {number|BitField|BitFieldResolvable[]} BitFieldResolvable - */ - /** - * Resolves bitfields to their numeric form. - * @param {BitFieldResolvable} [bit=0] - bit(s) to resolve - * @returns {number} - */ - static resolve(bit = 0n) { - if ((typeof bit === "number" || typeof bit === "bigint") && bit >= 0n) - return BigInt(bit); - if (bit instanceof BitField) - return bit.bitfield; - if (Array.isArray(bit)) - return bit.map((p) => this.resolve(p)).reduce((prev, p) => BigInt(prev) | BigInt(p), 0n); - if (typeof bit === "string" && typeof this.FLAGS[bit] !== "undefined") - return this.FLAGS[bit]; - throw new RangeError("BITFIELD_INVALID: " + bit); - } -} -exports.BitField = BitField; -//# sourceMappingURL=BitField.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/BitField.js.map b/dist/server-util/src/util/BitField.js.map deleted file mode 100644 index 9fed2fff..00000000 --- a/dist/server-util/src/util/BitField.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BitField.js","sourceRoot":"","sources":["../../../../src/util/BitField.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAOb;;GAEG;AACH,MAAa,QAAQ;IAKpB,YAAY,OAA2B,CAAC;QAJjC,aAAQ,GAAW,MAAM,CAAC,CAAC,CAAC,CAAC;QAKnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,GAAuB;QAC1B,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,GAAuB;QAC7B,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAED;;OA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G,YAAY,QAAQ;YAAE,OAAO,GAAG,CAAC,QAAQ,CAAC;QACjD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;YACrB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC1F,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9F,MAAM,IAAI,UAAU,CAAC,oBAAoB,GAAG,GAAG,CAAC,CAAC;IAClD,CAAC;CACD;AA/HD,4BA+HC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Config.d.ts b/dist/server-util/src/util/Config.d.ts deleted file mode 100644 index 2ab792f5..00000000 --- a/dist/server-util/src/util/Config.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import "missing-native-js-functions"; -declare const _default: { - init: (opts?: DefaultOptions) => Promise<void>; - getAll: () => DefaultOptions; - setAll: (val: any) => any; -}; -export default _default; -export interface DefaultOptions { - api?: any; - gateway?: any; - voice?: any; -} -export declare const DefaultOptions: DefaultOptions; diff --git a/dist/server-util/src/util/Config.js b/dist/server-util/src/util/Config.js deleted file mode 100644 index 5c41d39a..00000000 --- a/dist/server-util/src/util/Config.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultOptions = void 0; -require("missing-native-js-functions"); -const Database_1 = __importDefault(require("./Database")); -var Config; -exports.default = { - init: async function init(opts = exports.DefaultOptions) { - Config = await Database_1.default.data.config({}).cache(); - await Config.init(); - await Config.set(opts.merge(Config.cache || {})); - }, - getAll: function get() { - return Config.get(); - }, - setAll: function set(val) { - return Config.set(val); - }, -}; -exports.DefaultOptions = { - api: {}, - gateway: {}, - voice: {}, -}; -//# sourceMappingURL=Config.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Config.js.map b/dist/server-util/src/util/Config.js.map deleted file mode 100644 index d4d5a3ba..00000000 --- a/dist/server-util/src/util/Config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../../../src/util/Config.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqC;AACrC,0DAA4B;AAE5B,IAAI,MAAqB,CAAC;AAE1B,kBAAe;IACd,IAAI,EAAE,KAAK,UAAU,IAAI,CAAC,OAAuB,sBAAc;QAC9D,MAAM,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QAC1C,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,EAAE,SAAS,GAAG;QACnB,OAAuB,MAAM,CAAC,GAAG,EAAE,CAAC;IACrC,CAAC;IACD,MAAM,EAAE,SAAS,GAAG,CAAC,GAAQ;QAC5B,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;CACD,CAAC;AAQW,QAAA,cAAc,GAAmB;IAC7C,GAAG,EAAE,EAAE;IACP,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACT,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Constants.d.ts b/dist/server-util/src/util/Constants.d.ts deleted file mode 100644 index ecceb4e6..00000000 --- a/dist/server-util/src/util/Constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { VerifyOptions } from "jsonwebtoken"; -export declare const JWTOptions: VerifyOptions; diff --git a/dist/server-util/src/util/Constants.js b/dist/server-util/src/util/Constants.js deleted file mode 100644 index d65f8185..00000000 --- a/dist/server-util/src/util/Constants.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JWTOptions = void 0; -exports.JWTOptions = { algorithms: ["HS256"] }; -//# sourceMappingURL=Constants.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Constants.js.map b/dist/server-util/src/util/Constants.js.map deleted file mode 100644 index d24e9439..00000000 --- a/dist/server-util/src/util/Constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../../../src/util/Constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAkB,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Database.d.ts b/dist/server-util/src/util/Database.d.ts deleted file mode 100644 index 1a45ea78..00000000 --- a/dist/server-util/src/util/Database.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { MongoDatabase } from "lambert-db"; -declare const db: MongoDatabase; -export default db; diff --git a/dist/server-util/src/util/Database.js b/dist/server-util/src/util/Database.js deleted file mode 100644 index 9ac6eeeb..00000000 --- a/dist/server-util/src/util/Database.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const lambert_db_1 = require("lambert-db"); -// TODO: load url from config -const db = new lambert_db_1.MongoDatabase("mongodb://127.0.0.1:27017/lambert?readPreference=secondaryPreferred", { - useNewUrlParser: true, - useUnifiedTopology: false, -}); -exports.default = db; -//# sourceMappingURL=Database.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Database.js.map b/dist/server-util/src/util/Database.js.map deleted file mode 100644 index d85557dc..00000000 --- a/dist/server-util/src/util/Database.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../../../src/util/Database.ts"],"names":[],"mappings":";;AAAA,2CAA2C;AAE3C,6BAA6B;AAC7B,MAAM,EAAE,GAAG,IAAI,0BAAa,CAAC,qEAAqE,EAAE;IACnG,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,KAAK;CACzB,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Intents.d.ts b/dist/server-util/src/util/Intents.d.ts deleted file mode 100644 index bf8bac90..00000000 --- a/dist/server-util/src/util/Intents.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BitField } from "./BitField"; -export declare class Intents extends BitField { - static FLAGS: { - GUILDS: bigint; - GUILD_MEMBERS: bigint; - GUILD_BANS: bigint; - GUILD_EMOJIS: bigint; - GUILD_INTEGRATIONS: bigint; - GUILD_WEBHOOKS: bigint; - GUILD_INVITES: bigint; - GUILD_VOICE_STATES: bigint; - GUILD_PRESENCES: bigint; - GUILD_MESSAGES: bigint; - GUILD_MESSAGE_REACTIONS: bigint; - GUILD_MESSAGE_TYPING: bigint; - DIRECT_MESSAGES: bigint; - DIRECT_MESSAGE_REACTIONS: bigint; - DIRECT_MESSAGE_TYPING: bigint; - }; -} diff --git a/dist/server-util/src/util/Intents.js b/dist/server-util/src/util/Intents.js deleted file mode 100644 index 5a7baa8c..00000000 --- a/dist/server-util/src/util/Intents.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Intents = void 0; -const BitField_1 = require("./BitField"); -class Intents extends BitField_1.BitField { -} -exports.Intents = Intents; -Intents.FLAGS = { - GUILDS: 1n << 0n, - GUILD_MEMBERS: 1n << 1n, - GUILD_BANS: 1n << 2n, - GUILD_EMOJIS: 1n << 3n, - GUILD_INTEGRATIONS: 1n << 4n, - GUILD_WEBHOOKS: 1n << 5n, - GUILD_INVITES: 1n << 6n, - GUILD_VOICE_STATES: 1n << 7n, - GUILD_PRESENCES: 1n << 8n, - GUILD_MESSAGES: 1n << 9n, - GUILD_MESSAGE_REACTIONS: 1n << 10n, - GUILD_MESSAGE_TYPING: 1n << 11n, - DIRECT_MESSAGES: 1n << 12n, - DIRECT_MESSAGE_REACTIONS: 1n << 13n, - DIRECT_MESSAGE_TYPING: 1n << 14n, -}; -//# sourceMappingURL=Intents.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Intents.js.map b/dist/server-util/src/util/Intents.js.map deleted file mode 100644 index 162e3777..00000000 --- a/dist/server-util/src/util/Intents.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Intents.js","sourceRoot":"","sources":["../../../../src/util/Intents.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,OAAQ,SAAQ,mBAAQ;;AAArC,0BAkBC;AAjBO,aAAK,GAAG;IACd,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,UAAU,EAAE,EAAE,IAAI,EAAE;IACpB,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,kBAAkB,EAAE,EAAE,IAAI,EAAE;IAC5B,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,kBAAkB,EAAE,EAAE,IAAI,EAAE;IAC5B,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB,uBAAuB,EAAE,EAAE,IAAI,GAAG;IAClC,oBAAoB,EAAE,EAAE,IAAI,GAAG;IAC/B,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,wBAAwB,EAAE,EAAE,IAAI,GAAG;IACnC,qBAAqB,EAAE,EAAE,IAAI,GAAG;CAChC,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/MessageFlags.d.ts b/dist/server-util/src/util/MessageFlags.d.ts deleted file mode 100644 index 9a0a8e40..00000000 --- a/dist/server-util/src/util/MessageFlags.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { BitField } from "./BitField"; -export declare class MessageFlags extends BitField { - static FLAGS: { - CROSSPOSTED: bigint; - IS_CROSSPOST: bigint; - SUPPRESS_EMBEDS: bigint; - SOURCE_MESSAGE_DELETED: bigint; - URGENT: bigint; - }; -} diff --git a/dist/server-util/src/util/MessageFlags.js b/dist/server-util/src/util/MessageFlags.js deleted file mode 100644 index bdfed0fe..00000000 --- a/dist/server-util/src/util/MessageFlags.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -// https://github.com/discordjs/discord.js/blob/master/src/util/MessageFlags.js -// Apache License Version 2.0 Copyright 2015 - 2021 Amish Shah -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageFlags = void 0; -const BitField_1 = require("./BitField"); -class MessageFlags extends BitField_1.BitField { -} -exports.MessageFlags = MessageFlags; -MessageFlags.FLAGS = { - CROSSPOSTED: 1n << 0n, - IS_CROSSPOST: 1n << 1n, - SUPPRESS_EMBEDS: 1n << 2n, - SOURCE_MESSAGE_DELETED: 1n << 3n, - URGENT: 1n << 4n, -}; -//# sourceMappingURL=MessageFlags.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/MessageFlags.js.map b/dist/server-util/src/util/MessageFlags.js.map deleted file mode 100644 index c405d611..00000000 --- a/dist/server-util/src/util/MessageFlags.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MessageFlags.js","sourceRoot":"","sources":["../../../../src/util/MessageFlags.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,8DAA8D;;;AAE9D,yCAAsC;AAEtC,MAAa,YAAa,SAAQ,mBAAQ;;AAA1C,oCAQC;AAPO,kBAAK,GAAG;IACd,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB,sBAAsB,EAAE,EAAE,IAAI,EAAE;IAChC,MAAM,EAAE,EAAE,IAAI,EAAE;CAChB,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Permissions.d.ts b/dist/server-util/src/util/Permissions.d.ts deleted file mode 100644 index 8373f7c8..00000000 --- a/dist/server-util/src/util/Permissions.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { BitField } from "./BitField"; -export declare type PermissionResolvable = string | number | Permissions | PermissionResolvable[]; -export declare class Permissions extends BitField { - static FLAGS: { - CREATE_INSTANT_INVITE: bigint; - KICK_MEMBERS: bigint; - BAN_MEMBERS: bigint; - ADMINISTRATOR: bigint; - MANAGE_CHANNELS: bigint; - MANAGE_GUILD: bigint; - ADD_REACTIONS: bigint; - VIEW_AUDIT_LOG: bigint; - PRIORITY_SPEAKER: bigint; - STREAM: bigint; - VIEW_CHANNEL: bigint; - SEND_MESSAGES: bigint; - SEND_TTS_MESSAGES: bigint; - MANAGE_MESSAGES: bigint; - EMBED_LINKS: bigint; - ATTACH_FILES: bigint; - READ_MESSAGE_HISTORY: bigint; - MENTION_EVERYONE: bigint; - USE_EXTERNAL_EMOJIS: bigint; - VIEW_GUILD_INSIGHTS: bigint; - CONNECT: bigint; - SPEAK: bigint; - MUTE_MEMBERS: bigint; - DEAFEN_MEMBERS: bigint; - MOVE_MEMBERS: bigint; - USE_VAD: bigint; - CHANGE_NICKNAME: bigint; - MANAGE_NICKNAMES: bigint; - MANAGE_ROLES: bigint; - MANAGE_WEBHOOKS: bigint; - MANAGE_EMOJIS: bigint; - }; - any(permission: PermissionResolvable, checkAdmin?: boolean): boolean; - /** - * Checks whether the bitfield has a permission, or multiple permissions. - * @param {PermissionResolvable} permission Permission(s) to check for - * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override - * @returns {boolean} - */ - has(permission: PermissionResolvable, checkAdmin?: boolean): boolean; -} diff --git a/dist/server-util/src/util/Permissions.js b/dist/server-util/src/util/Permissions.js deleted file mode 100644 index 596e1fa9..00000000 --- a/dist/server-util/src/util/Permissions.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -// https://github.com/discordjs/discord.js/blob/master/src/util/Permissions.js -// Apache License Version 2.0 Copyright 2015 - 2021 Amish Shah -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Permissions = void 0; -const BitField_1 = require("./BitField"); -class Permissions extends BitField_1.BitField { - any(permission, checkAdmin = true) { - return (checkAdmin && super.has(Permissions.FLAGS.ADMINISTRATOR)) || super.any(permission); - } - /** - * Checks whether the bitfield has a permission, or multiple permissions. - * @param {PermissionResolvable} permission Permission(s) to check for - * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override - * @returns {boolean} - */ - has(permission, checkAdmin = true) { - return (checkAdmin && super.has(Permissions.FLAGS.ADMINISTRATOR)) || super.has(permission); - } -} -exports.Permissions = Permissions; -Permissions.FLAGS = { - CREATE_INSTANT_INVITE: 1n << 0n, - KICK_MEMBERS: 1n << 1n, - BAN_MEMBERS: 1n << 2n, - ADMINISTRATOR: 1n << 3n, - MANAGE_CHANNELS: 1n << 4n, - MANAGE_GUILD: 1n << 5n, - ADD_REACTIONS: 1n << 6n, - VIEW_AUDIT_LOG: 1n << 7n, - PRIORITY_SPEAKER: 1n << 8n, - STREAM: 1n << 9n, - VIEW_CHANNEL: 1n << 10n, - SEND_MESSAGES: 1n << 11n, - SEND_TTS_MESSAGES: 1n << 12n, - MANAGE_MESSAGES: 1n << 13n, - EMBED_LINKS: 1n << 14n, - ATTACH_FILES: 1n << 15n, - READ_MESSAGE_HISTORY: 1n << 16n, - MENTION_EVERYONE: 1n << 17n, - USE_EXTERNAL_EMOJIS: 1n << 18n, - VIEW_GUILD_INSIGHTS: 1n << 19n, - CONNECT: 1n << 20n, - SPEAK: 1n << 21n, - MUTE_MEMBERS: 1n << 22n, - DEAFEN_MEMBERS: 1n << 23n, - MOVE_MEMBERS: 1n << 24n, - USE_VAD: 1n << 25n, - CHANGE_NICKNAME: 1n << 26n, - MANAGE_NICKNAMES: 1n << 27n, - MANAGE_ROLES: 1n << 28n, - MANAGE_WEBHOOKS: 1n << 29n, - MANAGE_EMOJIS: 1n << 30n, -}; -//# sourceMappingURL=Permissions.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Permissions.js.map b/dist/server-util/src/util/Permissions.js.map deleted file mode 100644 index f1a01f0e..00000000 --- a/dist/server-util/src/util/Permissions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../../../../src/util/Permissions.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,8DAA8D;;;AAE9D,yCAAsC;AAItC,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;;;;;OAKG;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,CAAC,CAAC;IAC5F,CAAC;;AA/CF,kCAgDC;AA/CO,iBAAK,GAAG;IACd,qBAAqB,EAAE,EAAE,IAAI,EAAE;IAC/B,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB,gBAAgB,EAAE,EAAE,IAAI,EAAE;IAC1B,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,oBAAoB,EAAE,EAAE,IAAI,GAAG;IAC/B,gBAAgB,EAAE,EAAE,IAAI,GAAG;IAC3B,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B,OAAO,EAAE,EAAE,IAAI,GAAG;IAClB,KAAK,EAAE,EAAE,IAAI,GAAG;IAChB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,OAAO,EAAE,EAAE,IAAI,GAAG;IAClB,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,gBAAgB,EAAE,EAAE,IAAI,GAAG;IAC3B,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B,aAAa,EAAE,EAAE,IAAI,GAAG;CACxB,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/Snowflake.d.ts b/dist/server-util/src/util/Snowflake.d.ts deleted file mode 100644 index bd8c05bb..00000000 --- a/dist/server-util/src/util/Snowflake.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * A container for useful snowflake-related methods. - */ -export declare class Snowflake { - static readonly EPOCH = 1420070400000; - static INCREMENT: bigint; - static processId: bigint; - static workerId: bigint; - constructor(); - /** - * A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z - * ``` - * If we have a snowflake '266241948824764416' we can represent it as binary: - * - * 64 22 17 12 0 - * 000000111011000111100001101001000101000000 00001 00000 000000000000 - * number of ms since Discord epoch worker pid increment - * ``` - * @typedef {string} Snowflake - */ - /** - * Transforms a snowflake from a decimal string to a bit string. - * @param {Snowflake} num Snowflake to be transformed - * @returns {string} - * @private - */ - static idToBinary(num: any): string; - /** - * Transforms a snowflake from a bit string to a decimal string. - * @param {string} num Bit string to be transformed - * @returns {Snowflake} - * @private - */ - static binaryToID(num: any): string; - static generate(): bigint; - /** - * A deconstructed snowflake. - * @typedef {Object} DeconstructedSnowflake - * @property {number} timestamp Timestamp the snowflake was created - * @property {Date} date Date the snowflake was created - * @property {number} workerID Worker ID in the snowflake - * @property {number} processID Process ID in the snowflake - * @property {number} increment Increment in the snowflake - * @property {string} binary Binary representation of the snowflake - */ - /** - * Deconstructs a Discord snowflake. - * @param {Snowflake} snowflake Snowflake to deconstruct - * @returns {DeconstructedSnowflake} Deconstructed snowflake - */ - static deconstruct(snowflake: any): { - timestamp: any; - workerID: number; - processID: number; - increment: number; - binary: string; - }; -} diff --git a/dist/server-util/src/util/Snowflake.js b/dist/server-util/src/util/Snowflake.js deleted file mode 100644 index 78373e95..00000000 --- a/dist/server-util/src/util/Snowflake.js +++ /dev/null @@ -1,116 +0,0 @@ -// @ts-nocheck -// https://github.com/discordjs/discord.js/blob/master/src/util/Snowflake.js -// Apache License Version 2.0 Copyright 2015 - 2021 Amish Shah -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Snowflake = void 0; -// Discord epoch (2015-01-01T00:00:00.000Z) -/** - * A container for useful snowflake-related methods. - */ -class Snowflake { - constructor() { - throw new Error(`The ${this.constructor.name} class may not be instantiated.`); - } - /** - * A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z - * ``` - * If we have a snowflake '266241948824764416' we can represent it as binary: - * - * 64 22 17 12 0 - * 000000111011000111100001101001000101000000 00001 00000 000000000000 - * number of ms since Discord epoch worker pid increment - * ``` - * @typedef {string} Snowflake - */ - /** - * Transforms a snowflake from a decimal string to a bit string. - * @param {Snowflake} num Snowflake to be transformed - * @returns {string} - * @private - */ - static idToBinary(num) { - let bin = ""; - let high = parseInt(num.slice(0, -10)) || 0; - let low = parseInt(num.slice(-10)); - while (low > 0 || high > 0) { - bin = String(low & 1) + bin; - low = Math.floor(low / 2); - if (high > 0) { - low += 5000000000 * (high % 2); - high = Math.floor(high / 2); - } - } - return bin; - } - /** - * Transforms a snowflake from a bit string to a decimal string. - * @param {string} num Bit string to be transformed - * @returns {Snowflake} - * @private - */ - static binaryToID(num) { - let dec = ""; - while (num.length > 50) { - const high = parseInt(num.slice(0, -32), 2); - const low = parseInt((high % 10).toString(2) + num.slice(-32), 2); - dec = (low % 10).toString() + dec; - num = - Math.floor(high / 10).toString(2) + - Math.floor(low / 10) - .toString(2) - .padStart(32, "0"); - } - num = parseInt(num, 2); - while (num > 0) { - dec = (num % 10).toString() + dec; - num = Math.floor(num / 10); - } - return dec; - } - static generate() { - var time = BigInt(Date.now() - Snowflake.EPOCH) << 22n; - var worker = Snowflake.workerId << 17n; - var process = Snowflake.processId << 12n; - var increment = Snowflake.INCREMENT++; - return time | worker | process | increment; - } - /** - * A deconstructed snowflake. - * @typedef {Object} DeconstructedSnowflake - * @property {number} timestamp Timestamp the snowflake was created - * @property {Date} date Date the snowflake was created - * @property {number} workerID Worker ID in the snowflake - * @property {number} processID Process ID in the snowflake - * @property {number} increment Increment in the snowflake - * @property {string} binary Binary representation of the snowflake - */ - /** - * Deconstructs a Discord snowflake. - * @param {Snowflake} snowflake Snowflake to deconstruct - * @returns {DeconstructedSnowflake} Deconstructed snowflake - */ - static deconstruct(snowflake) { - const BINARY = Snowflake.idToBinary(snowflake).toString(2).padStart(64, "0"); - const res = { - timestamp: parseInt(BINARY.substring(0, 42), 2) + EPOCH, - workerID: parseInt(BINARY.substring(42, 47), 2), - processID: parseInt(BINARY.substring(47, 52), 2), - increment: parseInt(BINARY.substring(52, 64), 2), - binary: BINARY, - }; - Object.defineProperty(res, "date", { - get: function get() { - return new Date(this.timestamp); - }, - enumerable: true, - }); - return res; - } -} -exports.Snowflake = Snowflake; -Snowflake.EPOCH = 1420070400000; -Snowflake.INCREMENT = 0n; // max 4095 -Snowflake.processId = 0n; // max 31 -Snowflake.workerId = 0n; // max 31 -//# sourceMappingURL=Snowflake.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/Snowflake.js.map b/dist/server-util/src/util/Snowflake.js.map deleted file mode 100644 index f24ecbb9..00000000 --- a/dist/server-util/src/util/Snowflake.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Snowflake.js","sourceRoot":"","sources":["../../../../src/util/Snowflake.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,4EAA4E;AAC5E,8DAA8D;AAC9D,YAAY,CAAC;;;AAEb,2CAA2C;AAE3C;;GAEG;AACH,MAAa,SAAS;IAMrB;QACC,MAAM,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,iCAAiC,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;OAUG;IAEH;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG;QACpB,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACnC,OAAO,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE;YAC3B,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;YAC5B,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YAC1B,IAAI,IAAI,GAAG,CAAC,EAAE;gBACb,GAAG,IAAI,UAAU,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;gBAC/B,IAAI,GAAG,IAAI,CA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a,CAAC;AAC/B,mBAAS,GAAG,EAAE,CAAC,CAAC,WAAW;AAC3B,mBAAS,GAAG,EAAE,CAAC,CAAC,SAAS;AACzB,kBAAQ,GAAG,EAAE,CAAC,CAAC,SAAS"} \ No newline at end of file diff --git a/dist/server-util/src/util/String.d.ts b/dist/server-util/src/util/String.d.ts deleted file mode 100644 index 0ec4281e..00000000 --- a/dist/server-util/src/util/String.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const DOUBLE_WHITE_SPACE: RegExp; -export declare const SPECIAL_CHAR: RegExp; -export declare function trimSpecial(str: string): string; diff --git a/dist/server-util/src/util/String.js b/dist/server-util/src/util/String.js deleted file mode 100644 index 712328ef..00000000 --- a/dist/server-util/src/util/String.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.trimSpecial = exports.SPECIAL_CHAR = exports.DOUBLE_WHITE_SPACE = void 0; -exports.DOUBLE_WHITE_SPACE = /\s\s+/g; -exports.SPECIAL_CHAR = /[@#`:\r\n\t\f\v\p{C}]/gu; -function trimSpecial(str) { - return str.replace(exports.SPECIAL_CHAR, "").replace(exports.DOUBLE_WHITE_SPACE, " ").trim(); -} -exports.trimSpecial = trimSpecial; -//# sourceMappingURL=String.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/String.js.map b/dist/server-util/src/util/String.js.map deleted file mode 100644 index 8d5644c1..00000000 --- a/dist/server-util/src/util/String.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"String.js","sourceRoot":"","sources":["../../../../src/util/String.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,QAAQ,CAAC;AAC9B,QAAA,YAAY,GAAG,yBAAyB,CAAC;AAEtD,SAAgB,WAAW,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,OAAO,CAAC,oBAAY,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,0BAAkB,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9E,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/dist/server-util/src/util/UserFlags.d.ts b/dist/server-util/src/util/UserFlags.d.ts deleted file mode 100644 index b721d61c..00000000 --- a/dist/server-util/src/util/UserFlags.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BitField } from "./BitField"; -export declare class UserFlags extends BitField { - static FLAGS: { - DISCORD_EMPLOYEE: bigint; - PARTNERED_SERVER_OWNER: bigint; - HYPESQUAD_EVENTS: bigint; - BUGHUNTER_LEVEL_1: bigint; - HOUSE_BRAVERY: bigint; - HOUSE_BRILLIANCE: bigint; - HOUSE_BALANCE: bigint; - EARLY_SUPPORTER: bigint; - TEAM_USER: bigint; - SYSTEM: bigint; - BUGHUNTER_LEVEL_2: bigint; - VERIFIED_BOT: bigint; - EARLY_VERIFIED_BOT_DEVELOPER: bigint; - }; -} diff --git a/dist/server-util/src/util/UserFlags.js b/dist/server-util/src/util/UserFlags.js deleted file mode 100644 index 4df3f232..00000000 --- a/dist/server-util/src/util/UserFlags.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -// https://github.com/discordjs/discord.js/blob/master/src/util/UserFlags.js -// Apache License Version 2.0 Copyright 2015 - 2021 Amish Shah -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserFlags = void 0; -const BitField_1 = require("./BitField"); -class UserFlags extends BitField_1.BitField { -} -exports.UserFlags = UserFlags; -UserFlags.FLAGS = { - DISCORD_EMPLOYEE: 1n << 0n, - PARTNERED_SERVER_OWNER: 1n << 1n, - HYPESQUAD_EVENTS: 1n << 2n, - BUGHUNTER_LEVEL_1: 1n << 3n, - HOUSE_BRAVERY: 1n << 6n, - HOUSE_BRILLIANCE: 1n << 7n, - HOUSE_BALANCE: 1n << 8n, - EARLY_SUPPORTER: 1n << 9n, - TEAM_USER: 1n << 10n, - SYSTEM: 1n << 12n, - BUGHUNTER_LEVEL_2: 1n << 14n, - VERIFIED_BOT: 1n << 16n, - EARLY_VERIFIED_BOT_DEVELOPER: 1n << 17n, -}; -//# sourceMappingURL=UserFlags.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/UserFlags.js.map b/dist/server-util/src/util/UserFlags.js.map deleted file mode 100644 index c4d70e7b..00000000 --- a/dist/server-util/src/util/UserFlags.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UserFlags.js","sourceRoot":"","sources":["../../../../src/util/UserFlags.ts"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,8DAA8D;;;AAE9D,yCAAsC;AAEtC,MAAa,SAAU,SAAQ,mBAAQ;;AAAvC,8BAgBC;AAfO,eAAK,GAAG;IACd,gBAAgB,EAAE,EAAE,IAAI,EAAE;IAC1B,sBAAsB,EAAE,EAAE,IAAI,EAAE;IAChC,gBAAgB,EAAE,EAAE,IAAI,EAAE;IAC1B,iBAAiB,EAAE,EAAE,IAAI,EAAE;IAC3B,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,gBAAgB,EAAE,EAAE,IAAI,EAAE;IAC1B,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB,SAAS,EAAE,EAAE,IAAI,GAAG;IACpB,MAAM,EAAE,EAAE,IAAI,GAAG;IACjB,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB,4BAA4B,EAAE,EAAE,IAAI,GAAG;CACvC,CAAC"} \ No newline at end of file diff --git a/dist/server-util/src/util/checkToken.d.ts b/dist/server-util/src/util/checkToken.d.ts deleted file mode 100644 index f8dcbe12..00000000 --- a/dist/server-util/src/util/checkToken.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function checkToken(token: string): Promise<any>; diff --git a/dist/server-util/src/util/checkToken.js b/dist/server-util/src/util/checkToken.js deleted file mode 100644 index 17d88178..00000000 --- a/dist/server-util/src/util/checkToken.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkToken = void 0; -const Constants_1 = require("./Constants"); -const jsonwebtoken_1 = __importDefault(require("jsonwebtoken")); -const Config_1 = __importDefault(require("./Config")); -function checkToken(token) { - return new Promise((res, rej) => { - jsonwebtoken_1.default.verify(token, Config_1.default.getAll().api.security.jwtSecret, Constants_1.JWTOptions, (err, decoded) => { - if (err || !decoded) - return rej("Invalid Token"); - return res(decoded); - }); - }); -} -exports.checkToken = checkToken; -//# sourceMappingURL=checkToken.js.map \ No newline at end of file diff --git a/dist/server-util/src/util/checkToken.js.map b/dist/server-util/src/util/checkToken.js.map deleted file mode 100644 index 29e9d2ec..00000000 --- a/dist/server-util/src/util/checkToken.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"checkToken.js","sourceRoot":"","sources":["../../../../src/util/checkToken.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAyC;AACzC,gEAA+B;AAC/B,sDAA8B;AAE9B,SAAgB,UAAU,CAAC,KAAa;IACvC,OAAO,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC/B,sBAAG,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,sBAAU,EAAE,CAAC,GAAG,EAAE,OAAY,EAAE,EAAE;YAC3F,IAAI,GAAG,IAAI,CAAC,OAAO;gBAAE,OAAO,GAAG,CAAC,eAAe,CAAC,CAAC;YAEjD,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AARD,gCAQC"} \ No newline at end of file diff --git a/dist/util/Permissions.d.ts b/dist/util/Permissions.d.ts index 80d94803..964f0320 100644 --- a/dist/util/Permissions.d.ts +++ b/dist/util/Permissions.d.ts @@ -52,7 +52,8 @@ export declare class Permissions extends BitField { roles: Role[]; }; channel?: { - overwrites: ChannelPermissionOverwrite[]; + overwrites?: ChannelPermissionOverwrite[]; }; }): bigint; } +export declare function getPermission(user_id: bigint, guild_id: bigint, channel_id?: bigint): Promise<bigint>; diff --git a/dist/util/Permissions.js b/dist/util/Permissions.js index 0686e273..a62e8a8b 100644 --- a/dist/util/Permissions.js +++ b/dist/util/Permissions.js @@ -1,8 +1,11 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPermission = exports.Permissions = void 0; // https://github.com/discordjs/discord.js/blob/master/src/util/Permissions.js // Apache License Version 2.0 Copyright 2015 - 2021 Amish Shah -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Permissions = void 0; +const Member_1 = require("../models/Member"); +const Channel_1 = require("../models/Channel"); +const Role_1 = require("../models/Role"); const BitField_1 = require("./BitField"); class Permissions extends BitField_1.BitField { any(permission, checkAdmin = true) { @@ -81,4 +84,28 @@ Permissions.FLAGS = { MANAGE_WEBHOOKS: 1n << 29n, MANAGE_EMOJIS: 1n << 30n, }; +async function getPermission(user_id, guild_id, channel_id) { + var member = await Member_1.MemberModel.findOne({ guild_id, id: user_id }, "roles").exec(); + if (!member) + throw new Error("Member not found"); + var roles = await Role_1.RoleModel.find({ guild_id, id: { $in: member.roles } }).exec(); + let channel = null; + if (channel_id) { + channel = await Channel_1.ChannelModel.findOne({ id: channel_id }, "permission_overwrites"); + } + var permission = Permissions.finalPermission({ + user: { + id: user_id, + roles: member.roles, + }, + guild: { + roles: roles, + }, + channel: { + overwrites: channel?.permission_overwrites, + }, + }); + return permission; +} +exports.getPermission = getPermission; //# sourceMappingURL=Permissions.js.map \ No newline at end of file diff --git a/dist/util/Permissions.js.map b/dist/util/Permissions.js.map index 6b548f8c..d91d2115 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":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ted file mode 100644 index b0efd9c4..00000000 --- a/dist/util/convertBigIntToString.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "missing-native-js-functions"; -export declare function convertBigIntToString(obj: any): any; diff --git a/dist/util/convertBigIntToString.js b/dist/util/convertBigIntToString.js deleted file mode 100644 index a72b5a57..00000000 --- a/dist/util/convertBigIntToString.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertBigIntToString = void 0; -require("missing-native-js-functions"); -function convertBigIntToString(obj) { - if (typeof obj === "bigint") - obj = obj.toString(); - if (typeof obj === "object") { - obj.keys().forEach((key) => { - obj[key] = convertBigIntToString(obj[key]); - }); - } - return obj; -} -exports.convertBigIntToString = convertBigIntToString; -//# sourceMappingURL=convertBigIntToString.js.map \ No newline at end of file diff --git a/dist/util/convertBigIntToString.js.map b/dist/util/convertBigIntToString.js.map deleted file mode 100644 index 010706aa..00000000 --- a/dist/util/convertBigIntToString.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"convertBigIntToString.js","sourceRoot":"","sources":["../../src/util/convertBigIntToString.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAErC,SAAgB,qBAAqB,CAAC,GAAQ;IAC7C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;IAElD,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC5B,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YAClC,GAAG,CAAC,GAAG,CAAC,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;KACH;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AAVD,sDAUC"} \ No newline at end of file |