diff options
59 files changed, 493 insertions, 495 deletions
diff --git a/dist/models/Activity.d.ts b/dist/models/Activity.d.ts index dfa0815e..57462d60 100644 --- a/dist/models/Activity.d.ts +++ b/dist/models/Activity.d.ts @@ -3,7 +3,7 @@ import { ClientStatus, Status } from "./Status"; import { Types } from "mongoose"; export interface Presence { user: User; - guild_id?: bigint; + guild_id?: string; status: Status; activities: Activity[]; client_status: ClientStatus; @@ -17,12 +17,12 @@ export interface Activity { start?: number; end?: number; }[]; - application_id?: bigint; + application_id?: string; details?: string; state?: string; emoji?: { name: string; - id?: bigint; + id?: string; amimated?: boolean; }; party?: { @@ -52,12 +52,12 @@ export declare const Activity: { $start: NumberConstructor; $end: NumberConstructor; }[]; - $application_id: typeof Types.Long; + $application_id: StringConstructor; $details: StringConstructor; $state: StringConstructor; $emoji: { $name: StringConstructor; - $id: typeof Types.Long; + $id: StringConstructor; $amimated: BooleanConstructor; }; $party: { diff --git a/dist/models/Activity.js b/dist/models/Activity.js index 020856db..d9a19ead 100644 --- a/dist/models/Activity.js +++ b/dist/models/Activity.js @@ -13,12 +13,12 @@ exports.Activity = { $end: Number, }, ], - $application_id: mongoose_1.Types.Long, + $application_id: String, $details: String, $state: String, $emoji: { $name: String, - $id: mongoose_1.Types.Long, + $id: String, $amimated: Boolean, }, $party: { diff --git a/dist/models/Activity.js.map b/dist/models/Activity.js.map index 786f0184..8ce7d191 100644 --- a/dist/models/Activity.js.map +++ b/dist/models/Activity.js.map @@ -1 +1 @@ -{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/models/Activity.ts"],"names":[],"mappings":";;;AAEA,uCAA0D;AA8C7C,QAAA,QAAQ,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE;QACZ;YACC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;SACZ;KACD;IACD,eAAe,EAAE,gBAAK,CAAC,IAAI;IAC3B,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE;QACP,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,gBAAK,CAAC,IAAI;QACf,SAAS,EAAE,OAAO;KAClB;IACD,MAAM,EAAE;QACP,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;IACD,OAAO,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,MAAM;KACnB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,MAAM;KACd;IACD,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,gBAAK,CAAC,IAAI;CAClB,CAAC;AAEF,IAAY,YAMX;AAND,WAAY,YAAY;IACvB,+CAAQ,CAAA;IACR,yDAAa,CAAA;IACb,yDAAa,CAAA;IACb,mDAAU,CAAA;IACV,yDAAa,CAAA;AACd,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"} \ No newline at end of file +{"version":3,"file":"Activity.js","sourceRoot":"","sources":["../../src/models/Activity.ts"],"names":[],"mappings":";;;AAEA,uCAA0D;AA8C7C,QAAA,QAAQ,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE;QACZ;YACC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;SACZ;KACD;IACD,eAAe,EAAE,MAAM;IACvB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE;QACP,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,MAAM;QACX,SAAS,EAAE,OAAO;KAClB;IACD,MAAM,EAAE;QACP,GAAG,EAAE,MAAM;QACX,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;IACD,OAAO,EAAE;QACR,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,MAAM;QACpB,WAAW,EAAE,MAAM;KACnB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,MAAM;QACjB,MAAM,EAAE,MAAM;KACd;IACD,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,gBAAK,CAAC,IAAI;CAClB,CAAC;AAEF,IAAY,YAMX;AAND,WAAY,YAAY;IACvB,+CAAQ,CAAA;IACR,yDAAa,CAAA;IACb,yDAAa,CAAA;IACb,mDAAU,CAAA;IACV,yDAAa,CAAA;AACd,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"} \ No newline at end of file diff --git a/dist/models/Application.d.ts b/dist/models/Application.d.ts index 53483c49..68e026bb 100644 --- a/dist/models/Application.d.ts +++ b/dist/models/Application.d.ts @@ -1,6 +1,6 @@ export interface ApplicationCommand { - id: bigint; - application_id: bigint; + id: string; + application_id: string; name: string; description: string; options?: ApplicationCommandOption[]; @@ -28,7 +28,7 @@ export declare enum ApplicationCommandOptionType { ROLE = 8 } export interface ApplicationCommandInteractionData { - id: bigint; + id: string; name: string; options?: ApplicationCommandInteractionDataOption[]; } diff --git a/dist/models/AuditLog.d.ts b/dist/models/AuditLog.d.ts index 902513a3..76c21807 100644 --- a/dist/models/AuditLog.d.ts +++ b/dist/models/AuditLog.d.ts @@ -1,5 +1,5 @@ /// <reference path="../util/MongoBigInt.d.ts" /> -import { Schema, Document, Types } from "mongoose"; +import { Schema, Document } from "mongoose"; import { ChannelPermissionOverwrite } from "./Channel"; import { PublicUser } from "./User"; export interface AuditLogResponse { @@ -9,17 +9,17 @@ export interface AuditLogResponse { integrations: []; } export interface AuditLogEntries { - target_id?: bigint; - user_id: bigint; - id: bigint; + target_id?: string; + user_id: string; + id: string; action_type: AuditLogEvents; options?: { delete_member_days?: string; members_removed?: string; - channel_id?: bigint; - messaged_id?: bigint; + channel_id?: string; + messaged_id?: string; count?: string; - id?: bigint; + id?: string; type?: string; role_name?: string; }; @@ -38,13 +38,13 @@ export interface AuditLogChangeValue { splash_hash?: string; discovery_splash_hash?: string; banner_hash?: string; - owner_id?: bigint; + owner_id?: string; region?: string; preferred_locale?: string; - afk_channel_id?: bigint; + afk_channel_id?: string; afk_timeout?: number; - rules_channel_id?: bigint; - public_updates_channel_id?: bigint; + rules_channel_id?: string; + public_updates_channel_id?: string; mfa_level?: number; verification_level?: number; explicit_content_filter?: number; @@ -54,14 +54,14 @@ export interface AuditLogChangeValue { $remove?: {}[]; prune_delete_days?: number; widget_enabled?: boolean; - widget_channel_id?: bigint; - system_channel_id?: bigint; + widget_channel_id?: string; + system_channel_id?: string; position?: number; topic?: string; bitrate?: number; permission_overwrites?: ChannelPermissionOverwrite[]; nsfw?: boolean; - application_id?: bigint; + application_id?: string; rate_limit_per_user?: number; permissions?: string; color?: number; @@ -70,8 +70,8 @@ export interface AuditLogChangeValue { allow?: string; deny?: string; code?: string; - channel_id?: bigint; - inviter_id?: bigint; + channel_id?: string; + inviter_id?: string; max_uses?: number; uses?: number; max_age?: number; @@ -80,7 +80,7 @@ export interface AuditLogChangeValue { mute?: boolean; nick?: string; avatar_hash?: string; - id?: bigint; + id?: string; type?: number; enable_emoticons?: boolean; expire_behavior?: number; @@ -88,7 +88,7 @@ export interface AuditLogChangeValue { user_limit?: number; } export interface AuditLogEntriesDocument extends Document, AuditLogEntries { - id: bigint; + id: string; } export declare const AuditLogChanges: { name: StringConstructor; @@ -97,13 +97,13 @@ export declare const AuditLogChanges: { splash_hash: StringConstructor; discovery_splash_hash: StringConstructor; banner_hash: StringConstructor; - owner_id: typeof Types.Long; + owner_id: StringConstructor; region: StringConstructor; preferred_locale: StringConstructor; - afk_channel_id: typeof Types.Long; + afk_channel_id: StringConstructor; afk_timeout: NumberConstructor; - rules_channel_id: typeof Types.Long; - public_updates_channel_id: typeof Types.Long; + rules_channel_id: StringConstructor; + public_updates_channel_id: StringConstructor; mfa_level: NumberConstructor; verification_level: NumberConstructor; explicit_content_filter: NumberConstructor; @@ -113,14 +113,14 @@ export declare const AuditLogChanges: { $remove: {}[]; prune_delete_days: NumberConstructor; widget_enabled: BooleanConstructor; - widget_channel_id: typeof Types.Long; - system_channel_id: typeof Types.Long; + widget_channel_id: StringConstructor; + system_channel_id: StringConstructor; position: NumberConstructor; topic: StringConstructor; bitrate: NumberConstructor; permission_overwrites: {}[]; nsfw: BooleanConstructor; - application_id: typeof Types.Long; + application_id: StringConstructor; rate_limit_per_user: NumberConstructor; permissions: StringConstructor; color: NumberConstructor; @@ -129,8 +129,8 @@ export declare const AuditLogChanges: { allow: StringConstructor; deny: StringConstructor; code: StringConstructor; - channel_id: typeof Types.Long; - inviter_id: typeof Types.Long; + channel_id: StringConstructor; + inviter_id: StringConstructor; max_uses: NumberConstructor; uses: NumberConstructor; max_age: NumberConstructor; @@ -139,7 +139,7 @@ export declare const AuditLogChanges: { mute: BooleanConstructor; nick: StringConstructor; avatar_hash: StringConstructor; - id: typeof Types.Long; + id: StringConstructor; type: NumberConstructor; enable_emoticons: BooleanConstructor; expire_behavior: NumberConstructor; diff --git a/dist/models/AuditLog.js b/dist/models/AuditLog.js index 53df5c30..2a76e5b7 100644 --- a/dist/models/AuditLog.js +++ b/dist/models/AuditLog.js @@ -13,13 +13,13 @@ exports.AuditLogChanges = { splash_hash: String, discovery_splash_hash: String, banner_hash: String, - owner_id: mongoose_1.Types.Long, + owner_id: String, region: String, preferred_locale: String, - afk_channel_id: mongoose_1.Types.Long, + afk_channel_id: String, afk_timeout: Number, - rules_channel_id: mongoose_1.Types.Long, - public_updates_channel_id: mongoose_1.Types.Long, + rules_channel_id: String, + public_updates_channel_id: String, mfa_level: Number, verification_level: Number, explicit_content_filter: Number, @@ -29,14 +29,14 @@ exports.AuditLogChanges = { $remove: [{}], prune_delete_days: Number, widget_enabled: Boolean, - widget_channel_id: mongoose_1.Types.Long, - system_channel_id: mongoose_1.Types.Long, + widget_channel_id: String, + system_channel_id: String, position: Number, topic: String, bitrate: Number, permission_overwrites: [{}], nsfw: Boolean, - application_id: mongoose_1.Types.Long, + application_id: String, rate_limit_per_user: Number, permissions: String, color: Number, @@ -45,8 +45,8 @@ exports.AuditLogChanges = { allow: String, deny: String, code: String, - channel_id: mongoose_1.Types.Long, - inviter_id: mongoose_1.Types.Long, + channel_id: String, + inviter_id: String, max_uses: Number, uses: Number, max_age: Number, @@ -55,7 +55,7 @@ exports.AuditLogChanges = { mute: Boolean, nick: String, avatar_hash: String, - id: mongoose_1.Types.Long, + id: String, type: Number, enable_emoticons: Boolean, expire_behavior: Number, @@ -63,17 +63,17 @@ exports.AuditLogChanges = { user_limit: Number, }; exports.AuditLogSchema = new mongoose_1.Schema({ - target_id: mongoose_1.Types.Long, - user_id: { type: mongoose_1.Types.Long, required: true }, - id: { type: mongoose_1.Types.Long, required: true }, + target_id: String, + user_id: { type: String, required: true }, + id: { type: String, required: true }, action_type: { type: Number, required: true }, options: { delete_member_days: String, members_removed: String, - channel_id: mongoose_1.Types.Long, - messaged_id: mongoose_1.Types.Long, + channel_id: String, + messaged_id: String, count: String, - id: mongoose_1.Types.Long, + id: String, type: String, role_name: String, }, diff --git a/dist/models/AuditLog.js.map b/dist/models/AuditLog.js.map index b809fa3d..6529c239 100644 --- a/dist/models/AuditLog.js.map +++ b/dist/models/AuditLog.js.map @@ -1 +1 @@ -{"version":3,"file":"AuditLog.js","sourceRoot":"","sources":["../../src/models/AuditLog.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAiGrB,QAAA,eAAe,GAAG;IAC9B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,MAAM;IACnB,qBAAqB,EAAE,MAAM;IAC7B,WAAW,EAAE,MAAM;IACnB,QAAQ,EAA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AkB,CAAA;IAClB,gFAAuB,CAAA;IACvB,kEAAgB,CAAA;IAChB,8EAAsB,CAAA;IACtB,0DAAY,CAAA;IACZ,kEAAgB,CAAA;IAChB,kEAAgB,CAAA;IAChB,kEAAgB,CAAA;IAChB,sEAAkB,CAAA;IAClB,sEAAkB,CAAA;IAClB,sEAAkB,CAAA;IAClB,wEAAmB,CAAA;IACnB,wEAAmB,CAAA;IACnB,wEAAmB,CAAA;IACnB,oEAAiB,CAAA;IACjB,oEAAiB,CAAA;IACjB,oEAAiB,CAAA;IACjB,wEAAmB,CAAA;IACnB,kFAAwB,CAAA;IACxB,kEAAgB,CAAA;IAChB,sEAAkB,CAAA;IAClB,gFAAuB,CAAA;IACvB,gFAAuB,CAAA;IACvB,gFAAuB,CAAA;AACxB,CAAC,EApCW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAoCzB"} \ No newline at end of file +{"version":3,"file":"AuditLog.js","sourceRoot":"","sources":["../../src/models/AuditLog.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAiGrB,QAAA,eAAe,GAAG;IAC9B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,MAAM;IACnB,qBAAqB,EAAE,MAAM;IAC7B,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;IACd,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,MAAM;IACtB,WAAW,EAAE,MAAM;IACnB,gBAAgB,EAAE,MAAM;IACxB,yBAAyB,EAAE,MAAM;IACjC,SAAS,EAAE,MAAM;IACjB,kBAAkB,EAAE,MAAM;IAC1B,uBAAuB,EAAE,MAAM;IAC/B,6BAA6B,EAAE,MAAM;IACrC,eAAe,EAAE,MAAM;IACvB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,iBAAiB,EAAE,MAA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ad3a39b7 100644 --- a/dist/models/Ban.d.ts +++ b/dist/models/Ban.d.ts @@ -1,9 +1,9 @@ /// <reference path="../util/MongoBigInt.d.ts" /> import { Schema, Document } from "mongoose"; export interface Ban extends Document { - user_id: bigint; - guild_id: bigint; - executor_id: bigint; + user_id: string; + guild_id: string; + executor_id: string; ip: string; reason?: string; } diff --git a/dist/models/Ban.js b/dist/models/Ban.js index abb0a4e2..0b7f30b5 100644 --- a/dist/models/Ban.js +++ b/dist/models/Ban.js @@ -7,9 +7,9 @@ exports.BanModel = exports.BanSchema = void 0; const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.BanSchema = new mongoose_1.Schema({ - user_id: { type: mongoose_1.Types.Long, required: true }, - guild_id: { type: mongoose_1.Types.Long, required: true }, - executor_id: { type: mongoose_1.Types.Long, required: true }, + user_id: { type: String, required: true }, + guild_id: { type: String, required: true }, + executor_id: { type: String, required: true }, reason: String, ip: String, }); diff --git a/dist/models/Ban.js.map b/dist/models/Ban.js.map index 580002a0..6a10fccb 100644 --- a/dist/models/Ban.js.map +++ b/dist/models/Ban.js.map @@ -1 +1 @@ -{"version":3,"file":"Ban.js","sourceRoot":"","sources":["../../src/models/Ban.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAUrB,QAAA,SAAS,GAAG,IAAI,iBAAM,CAAC;IACnC,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACjD,MAAM,EAAE,MAAM;IACd,EAAE,EAAE,MAAM;CACV,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,QAAQ,GAAG,kBAAE,CAAC,KAAK,CAAM,KAAK,EAAE,iBAAS,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Ban.js","sourceRoot":"","sources":["../../src/models/Ban.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAUrB,QAAA,SAAS,GAAG,IAAI,iBAAM,CAAC;IACnC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,MAAM,EAAE,MAAM;IACd,EAAE,EAAE,MAAM;CACV,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,QAAQ,GAAG,kBAAE,CAAC,KAAK,CAAM,KAAK,EAAE,iBAAS,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Channel.d.ts b/dist/models/Channel.d.ts index 5cd7b342..d3048622 100644 --- a/dist/models/Channel.d.ts +++ b/dist/models/Channel.d.ts @@ -3,30 +3,30 @@ import { Schema, Document } from "mongoose"; export interface AnyChannel extends Channel, DMChannel, TextChannel, VoiceChannel { } export interface ChannelDocument extends Document, AnyChannel { - id: bigint; + id: string; } export declare const ChannelSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>; export declare const ChannelModel: import("mongoose").Model<ChannelDocument>; export interface Channel { - id: bigint; + id: string; created_at: Date; name: string; type: number; } export interface TextBasedChannel { - last_message_id?: bigint; + last_message_id?: string; last_pin_timestamp?: number; } export interface GuildChannel extends Channel { - guild_id: bigint; + guild_id: string; position: number; - parent_id?: bigint; + parent_id?: string; permission_overwrites: ChannelPermissionOverwrite[]; } export interface ChannelPermissionOverwrite { allow: bigint; deny: bigint; - id: bigint; + id: string; type: ChannelPermissionOverwriteType; } export declare enum ChannelPermissionOverwriteType { @@ -41,8 +41,8 @@ export interface TextChannel extends GuildChannel, TextBasedChannel { topic?: string; } export interface DMChannel extends Channel, TextBasedChannel { - owner_id: bigint; - recipients: bigint[]; + owner_id: string; + recipients: string[]; } export declare enum ChannelType { GUILD_TEXT = 0, diff --git a/dist/models/Channel.js b/dist/models/Channel.js index 0c9a652a..956b1fc5 100644 --- a/dist/models/Channel.js +++ b/dist/models/Channel.js @@ -7,16 +7,16 @@ exports.ChannelType = exports.ChannelPermissionOverwriteType = exports.ChannelMo const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.ChannelSchema = new mongoose_1.Schema({ - id: mongoose_1.Types.Long, + id: String, created_at: { type: mongoose_1.Schema.Types.Date, required: true }, name: { type: String, required: true }, type: { type: Number, required: true }, - guild_id: mongoose_1.Types.Long, - owner_id: mongoose_1.Types.Long, - parent_id: mongoose_1.Types.Long, - recipients: [mongoose_1.Types.Long], + guild_id: String, + owner_id: String, + parent_id: String, + recipients: [String], position: Number, - last_message_id: mongoose_1.Types.Long, + last_message_id: String, last_pin_timestamp: Date, nsfw: Boolean, rate_limit_per_user: Number, @@ -25,7 +25,7 @@ exports.ChannelSchema = new mongoose_1.Schema({ { allow: mongoose_1.Types.Long, deny: mongoose_1.Types.Long, - id: mongoose_1.Types.Long, + id: String, type: Number, }, ], diff --git a/dist/models/Channel.js.map b/dist/models/Channel.js.map index 845169ac..ff804845 100644 --- a/dist/models/Channel.js.map +++ b/dist/models/Channel.js.map @@ -1 +1 @@ -{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../src/models/Channel.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAQrB,QAAA,aAAa,GAAG,IAAI,iBAAM,CAAC;IACvC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,UAAU,EAAE,EAAE,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,SAAS,EAAE,gBAAK,CAAC,IAAI;IACrB,UAAU,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM;IAChB,eAAe,EAAE,gBAAK,CAAC,IAAI;IAC3B,kBAAkB,EAAE,IAAI;IACxB,IAAI,EAAE,OAAO;IACb,mBAAmB,EAAE,MAAM;IAC3B,KAAK,EAAE,MAAM;IACb,qBAAqB,EAAE;QACtB;YACC,KAAK,EAAE,gBAAK,CAAC,IAAI;YACjB,IAAI,EAAE,gBAAK,CAAC,IAAI;YAChB,EAAE,EAAE,gBAAK,CAAC,IAAI;YACd,IAAI,EAAE,MAAM;SACZ;KACD;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,YAAY,GAAG,kBAAE,CAAC,KAAK,CAAkB,SAAS,EAAE,qBAAa,EAAE,UAAU,CAAC,CAAC;AA4B5F,IAAY,8BAGX;AAHD,WAAY,8BAA8B;IACzC,mFAAQ,CAAA;IACR,uFAAU,CAAA;AACX,CAAC,EAHW,8BAA8B,GAA9B,sCAA8B,KAA9B,sCAA8B,QAGzC;AAeD,IAAY,WAQX;AARD,WAAY,WAAW;IACtB,yDAAc,CAAA;IACd,yCAAM,CAAA;IACN,2DAAe,CAAA;IACf,qDAAY,CAAA;IACZ,iEAAkB,CAAA;IAClB,yDAAc,CAAA;IACd,2DAAe,CAAA;AAChB,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB"} \ No newline at end of file +{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../src/models/Channel.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAQrB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dist/models/Emoji.d.ts b/dist/models/Emoji.d.ts index 91c1abfe..9e53cc72 100644 --- a/dist/models/Emoji.d.ts +++ b/dist/models/Emoji.d.ts @@ -1,15 +1,15 @@ /// <reference path="../util/MongoBigInt.d.ts" /> import { Schema, Document } from "mongoose"; export interface Emoji extends Document { - id: bigint; + id: string; animated: boolean; available: boolean; - guild_id: bigint; + guild_id: string; managed: boolean; name: string; require_colons: boolean; url: string; - roles: bigint[]; + roles: string[]; } export declare const EmojiSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>; export declare const EmojiModel: import("mongoose").Model<Emoji>; diff --git a/dist/models/Emoji.js b/dist/models/Emoji.js index 79f2543f..5f9fc56f 100644 --- a/dist/models/Emoji.js +++ b/dist/models/Emoji.js @@ -7,15 +7,15 @@ exports.EmojiModel = exports.EmojiSchema = void 0; const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.EmojiSchema = new mongoose_1.Schema({ - id: { type: mongoose_1.Types.Long, required: true }, + id: { type: String, required: true }, animated: Boolean, available: Boolean, - guild_id: mongoose_1.Types.Long, + guild_id: String, managed: Boolean, name: String, require_colons: Boolean, url: String, - roles: [mongoose_1.Types.Long], + roles: [String], }); // @ts-ignore exports.EmojiModel = Database_1.default.model("Emoji", exports.EmojiSchema, "emojis"); diff --git a/dist/models/Emoji.js.map b/dist/models/Emoji.js.map index 76e2fd4d..f66fe302 100644 --- a/dist/models/Emoji.js.map +++ b/dist/models/Emoji.js.map @@ -1 +1 @@ -{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/models/Emoji.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAcrB,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,OAAO;IACvB,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;CACnB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,UAAU,GAAG,kBAAE,CAAC,KAAK,CAAQ,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/models/Emoji.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAcrB,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACpC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,OAAO;IACvB,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,CAAC,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,UAAU,GAAG,kBAAE,CAAC,KAAK,CAAQ,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Event.d.ts b/dist/models/Event.d.ts index e00c2a97..00ca7cac 100644 --- a/dist/models/Event.d.ts +++ b/dist/models/Event.d.ts @@ -13,9 +13,9 @@ import { ApplicationCommand } from "./Application"; import { Interaction } from "./Interaction"; import { Schema, Document } from "mongoose"; export interface Event { - guild_id?: bigint; - user_id?: bigint; - channel_id?: bigint; + guild_id?: string; + user_id?: string; + channel_id?: string; created_at?: Date; event: EVENT; data?: any; @@ -90,14 +90,14 @@ export interface ReadyEventData { partial: boolean; }; application?: { - id: bigint; + id: string; flags: bigint; }; merged_members?: Omit<Member, "settings" | "user">[][]; users?: { avatar?: string; discriminator: string; - id: bigint; + id: string; username: string; bot: boolean; public_flags: bigint; @@ -122,8 +122,8 @@ export interface ChannelDeleteEvent extends Event { export interface ChannelPinsUpdateEvent extends Event { event: "CHANNEL_PINS_UPDATE"; data: { - guild_id?: bigint; - channel_id: bigint; + guild_id?: string; + channel_id: string; last_pin_timestamp: number; }; } @@ -138,55 +138,55 @@ export interface GuildUpdateEvent extends Event { export interface GuildDeleteEvent extends Event { event: "GUILD_DELETE"; data: { - id: bigint; + id: string; unavailable?: boolean; }; } export interface GuildBanAddEvent extends Event { event: "GUILD_BAN_ADD"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } export interface GuildBanRemoveEvent extends Event { event: "GUILD_BAN_REMOVE"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } export interface GuildEmojiUpdateEvent extends Event { event: "GUILD_EMOJI_UPDATE"; data: { - guild_id: bigint; + guild_id: string; emojis: Emoji[]; }; } export interface GuildIntegrationUpdateEvent extends Event { event: "GUILD_INTEGRATIONS_UPDATE"; data: { - guild_id: bigint; + guild_id: string; }; } export interface GuildMemberAddEvent extends Event { event: "GUILD_MEMBER_ADD"; data: PublicMember & { - guild_id: bigint; + guild_id: string; }; } export interface GuildMemberRemoveEvent extends Event { event: "GUILD_MEMBER_REMOVE"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } export interface GuildMemberUpdateEvent extends Event { event: "GUILD_MEMBER_UPDATE"; data: { - guild_id: bigint; - roles: bigint[]; + guild_id: string; + roles: string[]; user: User; nick?: string; joined_at: Date; @@ -197,11 +197,11 @@ export interface GuildMemberUpdateEvent extends Event { export interface GuildMembersChunkEvent extends Event { event: "GUILD_MEMBERS_CHUNK"; data: { - guild_id: bigint; + guild_id: string; members: PublicMember[]; chunk_index: number; chunk_count: number; - not_found: bigint[]; + not_found: string[]; presences: Presence[]; nonce?: string; }; @@ -209,42 +209,42 @@ export interface GuildMembersChunkEvent extends Event { export interface GuildRoleCreateEvent extends Event { event: "GUILD_ROLE_CREATE"; data: { - guild_id: bigint; + guild_id: string; role: Role; }; } export interface GuildRoleUpdateEvent extends Event { event: "GUILD_ROLE_UPDATE"; data: { - guild_id: bigint; + guild_id: string; role: Role; }; } export interface GuildRoleDeleteEvent extends Event { event: "GUILD_ROLE_DELETE"; data: { - guild_id: bigint; - role_id: bigint; + guild_id: string; + role_id: string; }; } export interface InviteCreateEvent extends Event { event: "INVITE_CREATE"; data: Omit<Invite, "guild" | "channel"> & { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; }; } export interface InviteDeleteEvent extends Event { event: "INVITE_DELETE"; data: { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; code: string; }; } export declare type MessagePayload = Omit<Message, "author_id"> & { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; author: User; member: PublicMember; mentions: (User & { @@ -262,26 +262,26 @@ export interface MessageUpdateEvent extends Event { export interface MessageDeleteEvent extends Event { event: "MESSAGE_DELETE"; data: { - id: bigint; - channel_id: bigint; - guild_id?: bigint; + id: string; + channel_id: string; + guild_id?: string; }; } export interface MessageDeleteBulkEvent extends Event { event: "MESSAGE_DELETE_BULK"; data: { - ids: bigint[]; - channel_id: bigint; - guild_id?: bigint; + ids: string[]; + channel_id: string; + guild_id?: string; }; } export interface MessageReactionAddEvent extends Event { event: "MESSAGE_REACTION_ADD"; data: { - user_id: bigint; - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + user_id: string; + channel_id: string; + message_id: string; + guild_id?: string; member?: PublicMember; emoji: PartialEmoji; }; @@ -289,27 +289,27 @@ export interface MessageReactionAddEvent extends Event { export interface MessageReactionRemoveEvent extends Event { event: "MESSAGE_REACTION_REMOVE"; data: { - user_id: bigint; - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + user_id: string; + channel_id: string; + message_id: string; + guild_id?: string; emoji: PartialEmoji; }; } export interface MessageReactionRemoveAllEvent extends Event { event: "MESSAGE_REACTION_REMOVE_ALL"; data: { - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + channel_id: string; + message_id: string; + guild_id?: string; }; } export interface MessageReactionRemoveEmojiEvent extends Event { event: "MESSAGE_REACTION_REMOVE_EMOJI"; data: { - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + channel_id: string; + message_id: string; + guild_id?: string; emoji: PartialEmoji; }; } @@ -320,10 +320,10 @@ export interface PresenceUpdateEvent extends Event { export interface TypingStartEvent extends Event { event: "TYPING_START"; data: { - channel_id: bigint; - user_id: bigint; + channel_id: string; + user_id: string; timestamp: number; - guild_id?: bigint; + guild_id?: string; member?: PublicMember; }; } @@ -341,19 +341,19 @@ export interface VoiceServerUpdateEvent extends Event { event: "VOICE_SERVER_UPDATE"; data: { token: string; - guild_id: bigint; + guild_id: string; endpoint: string; }; } export interface WebhooksUpdateEvent extends Event { event: "WEBHOOKS_UPDATE"; data: { - guild_id: bigint; - channel_id: bigint; + guild_id: string; + channel_id: string; }; } export declare type ApplicationCommandPayload = ApplicationCommand & { - guild_id: bigint; + guild_id: string; }; export interface ApplicationCommandCreateEvent extends Event { event: "APPLICATION_COMMAND_CREATE"; diff --git a/dist/models/Event.js b/dist/models/Event.js index d6eb6f6e..9d442aad 100644 --- a/dist/models/Event.js +++ b/dist/models/Event.js @@ -7,9 +7,9 @@ exports.EVENTEnum = exports.EventModel = exports.EventSchema = void 0; const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.EventSchema = new mongoose_1.Schema({ - guild_id: mongoose_1.Types.Long, - user_id: mongoose_1.Types.Long, - channel_id: mongoose_1.Types.Long, + guild_id: String, + user_id: String, + channel_id: String, created_at: { type: Date, required: true }, event: { type: String, required: true }, data: Object, diff --git a/dist/models/Event.js.map b/dist/models/Event.js.map index 268c8597..bd27fa9e 100644 --- a/dist/models/Event.js.map +++ b/dist/models/Event.js.map @@ -1 +1 @@ -{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../src/models/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C5B,uCAA0B,CAAA;IAC1B,+CAAkC,CAAA;IAClC,qDAAwC,CAAA;IACxC,oDAAuC,CAAA;IACvC,sDAAyC,CAAA;IACzC,oEAAuD,CAAA;IACvD,oEAAuD,CAAA;IACvD,oEAAuD,CAAA;AACxD,CAAC,EAzCW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAyCpB"} \ No newline at end of file +{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../src/models/Event.ts"],"names":[],"mappings":";;;;;;AAYA,uCAA0D;AAC1D,gEAAkC;AAarB,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvC,IAAI,EAAE,MAAM;CACZ,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,UAAU,GAAG,kBAAE,CAAC,KAAK,CAAgB,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC;AAkYlF,+BAA+B;AAE/B,IAAY,SAyCX;AAzCD,WAAY,SAAS;IACpB,4BAAe,CAAA;IACf,6CAAgC,CAAA;IAChC,6CAAgC,CAAA;IAChC,6CAAgC,CAAA;IAChC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,yCAA4B,CAAA;IAC5B,yCAA4B,CAAA;IAC5B,0CAA6B,CAAA;IAC7B,gDAAmC,CAAA;IACnC,mDAAsC,CAAA;IACtC,kEAAqD,CAAA;IACrD,gDAAmC,CAAA;IACnC,sDAAyC,CAAA;IACzC,sDAAyC,CAAA;IACzC,0DAA6C,CAAA;IAC7C,sDAAyC,CAAA;IACzC,kDAAqC,CAAA;IACrC,kDAAqC,CAAA;IACrC,kDAAqC,CAAA;IACrC,2CAA8B,CAAA;IAC9B,2CAA8B,CAAA;IAC9B,6CAAgC,CAAA;IAChC,6CAAgC,CAAA;IAChC,6CAAgC,CAAA;IAChC,sDAAyC,CAAA;IACzC,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,qEAAwD,CAAA;IACxD,yEAA4D,CAAA;IAC5D,+CAAkC,CAAA;IAClC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,+CAAkC,CAAA;IAClC,qDAAwC,CAAA;IACxC,oDAAuC,CAAA;IACvC,sDAAyC,CAAA;IACzC,oEAAuD,CAAA;IACvD,oEAAuD,CAAA;IACvD,oEAAuD,CAAA;AACxD,CAAC,EAzCW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAyCpB"} \ No newline at end of file diff --git a/dist/models/Guild.d.ts b/dist/models/Guild.d.ts index 7ea96716..d7d94cb2 100644 --- a/dist/models/Guild.d.ts +++ b/dist/models/Guild.d.ts @@ -1,13 +1,13 @@ /// <reference path="../util/MongoBigInt.d.ts" /> import { Schema, Document } from "mongoose"; export interface GuildDocument extends Document, Guild { - id: bigint; + id: string; } export interface Guild { - id: bigint; - afk_channel_id?: bigint; + id: string; + afk_channel_id?: string; afk_timeout?: number; - application_id?: bigint; + application_id?: string; banner?: string; default_message_notifications?: number; description?: string; @@ -23,21 +23,21 @@ export interface Guild { presence_count?: number; mfa_level?: number; name: string; - owner_id: bigint; + owner_id: string; preferred_locale?: string; premium_subscription_count?: number; premium_tier?: number; - public_updates_channel_id?: bigint; + public_updates_channel_id?: string; region?: string; - rules_channel_id?: bigint; + rules_channel_id?: string; splash?: string; system_channel_flags?: number; - system_channel_id?: bigint; + system_channel_id?: string; unavailable?: boolean; vanity_url_code?: string; verification_level?: number; welcome_screen: []; - widget_channel_id?: bigint; + widget_channel_id?: string; widget_enabled?: boolean; } export declare const GuildSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>; diff --git a/dist/models/Guild.js b/dist/models/Guild.js index 6a8adfc5..fa87d542 100644 --- a/dist/models/Guild.js +++ b/dist/models/Guild.js @@ -11,10 +11,10 @@ const Emoji_1 = require("./Emoji"); const Member_1 = require("./Member"); const Role_1 = require("./Role"); exports.GuildSchema = new mongoose_1.Schema({ - id: { type: mongoose_1.Types.Long, required: true }, - afk_channel_id: mongoose_1.Types.Long, + id: { type: String, required: true }, + afk_channel_id: String, afk_timeout: Number, - application_id: mongoose_1.Types.Long, + application_id: String, banner: String, default_message_notifications: Number, description: String, @@ -30,22 +30,22 @@ exports.GuildSchema = new mongoose_1.Schema({ presence_count: Number, mfa_level: Number, name: { type: String, required: true }, - owner_id: { type: mongoose_1.Types.Long, required: true }, + owner_id: { type: String, required: true }, preferred_locale: String, premium_subscription_count: Number, premium_tier: Number, - public_updates_channel_id: mongoose_1.Types.Long, + public_updates_channel_id: String, region: String, - rules_channel_id: mongoose_1.Types.Long, + rules_channel_id: String, splash: String, system_channel_flags: Number, - system_channel_id: mongoose_1.Types.Long, + system_channel_id: String, unavailable: Boolean, vanity_url_code: String, verification_level: Number, voice_states: { type: [Object], default: [] }, welcome_screen: { type: [Object], default: [] }, - widget_channel_id: mongoose_1.Types.Long, + widget_channel_id: String, widget_enabled: Boolean, }); exports.GuildSchema.virtual("channels", { diff --git a/dist/models/Guild.js.map b/dist/models/Guild.js.map index e64d6c61..aaa3951b 100644 --- a/dist/models/Guild.js.map +++ b/dist/models/Guild.js.map @@ -1 +1 @@ -{"version":3,"file":"Guild.js","sourceRoot":"","sources":["../../src/models/Guild.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAClC,uCAAyC;AACzC,mCAAqC;AACrC,qCAAuC;AACvC,iCAAmC;AAiDtB,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,cAAc,EAAE,gBAAK,CAAC,IAAI;IAC1B,WAAW,EAAE,MAAM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AAM,CAAC,SAAS,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,UAAU,GAAG,kBAAE,CAAC,KAAK,CAAgB,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Interaction.d.ts b/dist/models/Interaction.d.ts index df03b8a9..53836981 100644 --- a/dist/models/Interaction.d.ts +++ b/dist/models/Interaction.d.ts @@ -1,11 +1,11 @@ import { AllowedMentions, Embed } from "./Message"; export interface Interaction { - id: bigint; + id: string; type: InteractionType; data?: {}; - guild_id: bigint; - channel_id: bigint; - member_id: bigint; + guild_id: string; + channel_id: string; + member_id: string; token: string; version: number; } diff --git a/dist/models/Invite.d.ts b/dist/models/Invite.d.ts index a151322b..e6de64d3 100644 --- a/dist/models/Invite.d.ts +++ b/dist/models/Invite.d.ts @@ -7,10 +7,10 @@ export interface Invite extends Document { max_uses: number; max_age: number; created_at: Date; - guild_id: bigint; - channel_id: bigint; - inviter_id: bigint; - target_user_id?: bigint; + guild_id: string; + channel_id: string; + inviter_id: string; + target_user_id?: string; target_user_type?: number; } export declare const InviteSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>; diff --git a/dist/models/Invite.js b/dist/models/Invite.js index 31d21278..9113abcc 100644 --- a/dist/models/Invite.js +++ b/dist/models/Invite.js @@ -13,11 +13,11 @@ exports.InviteSchema = new mongoose_1.Schema({ max_uses: Number, max_age: Number, created_at: Date, - guild_id: mongoose_1.Types.Long, - channel_id: mongoose_1.Types.Long, - inviter_id: mongoose_1.Types.Long, - //! What the fucking shit is this - target_user_id: mongoose_1.Types.Long, + guild_id: String, + channel_id: String, + inviter_id: String, + // ? What the fucking shit is this + target_user_id: String, target_user_type: Number, }); // @ts-ignore diff --git a/dist/models/Invite.js.map b/dist/models/Invite.js.map index 3b25219f..3e69e1d1 100644 --- a/dist/models/Invite.js.map +++ b/dist/models/Invite.js.map @@ -1 +1 @@ -{"version":3,"file":"Invite.js","sourceRoot":"","sources":["../../src/models/Invite.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAmBrB,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,UAAU,EAAE,gBAAK,CAAC,IAAI;IACtB,UAAU,EAAE,gBAAK,CAAC,IAAI;IAEtB,iCAAiC;IACjC,cAAc,EAAE,gBAAK,CAAC,IAAI;IAC1B,gBAAgB,EAAE,MAAM;CAExB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAS,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Invite.js","sourceRoot":"","sources":["../../src/models/Invite.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAkBrB,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,MAAM;IAElB,kCAAkC;IAClC,cAAc,EAAE,MAAM;IACtB,gBAAgB,EAAE,MAAM;CACxB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAS,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Member.d.ts b/dist/models/Member.d.ts index bf930613..26079e7c 100644 --- a/dist/models/Member.d.ts +++ b/dist/models/Member.d.ts @@ -2,10 +2,10 @@ import { PublicUser, User } from "./User"; import { Schema, Document } from "mongoose"; export interface Member { - id: bigint; - guild_id: bigint; + id: string; + guild_id: string; nick?: string; - roles: bigint[]; + roles: string[]; joined_at: Date; premium_since?: number; deaf: boolean; @@ -15,11 +15,11 @@ export interface Member { user?: User; } export interface MemberDocument extends Member, Document { - id: bigint; + id: string; } export interface UserGuildSettings { channel_overrides: { - channel_id: bigint; + channel_id: string; message_notifications: number; mute_config: MuteConfig; muted: boolean; diff --git a/dist/models/Member.js b/dist/models/Member.js index 26a728f0..c7717dd2 100644 --- a/dist/models/Member.js +++ b/dist/models/Member.js @@ -12,10 +12,10 @@ const MuteConfig = { selected_time_window: Number, }; exports.MemberSchema = new mongoose_1.Schema({ - id: { type: mongoose_1.Types.Long, required: true }, - guild_id: mongoose_1.Types.Long, + id: { type: String, required: true }, + guild_id: String, nick: String, - roles: [mongoose_1.Types.Long], + roles: [String], joined_at: Date, premium_since: Number, deaf: Boolean, @@ -24,7 +24,7 @@ exports.MemberSchema = new mongoose_1.Schema({ settings: { channel_overrides: [ { - channel_id: mongoose_1.Types.Long, + channel_id: String, message_notifications: Number, mute_config: MuteConfig, muted: Boolean, diff --git a/dist/models/Member.js.map b/dist/models/Member.js.map index aa0bae9b..c39e4bd1 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":";;;;;;AAAA,iCAAqD;AACrD,uCAAmD;AACnD,gEAAkC;AAyClC,MAAM,UAAU,GAAG;IAClB,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,MAAM;CAC5B,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IACnB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,MAAM;IACrB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,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;AAEH,oBAAY,CAAC,OAAO,CAAC,MAAM,EAAE;IAC5B,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAiB,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":";;;;;;AAAA,iCAAqD;AACrD,uCAAmD;AACnD,gEAAkC;AAyClC,MAAM,UAAU,GAAG;IAClB,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,MAAM;CAC5B,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACpC,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,CAAC,MAAM,CAAC;IACf,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,MAAM;IACrB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE;QACT,iBAAiB,EAAE;YAClB;gBACC,UAAU,EAAE,MAAM;gBAClB,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;AAEH,oBAAY,CAAC,OAAO,CAAC,MAAM,EAAE;IAC5B,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAiB,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Message.d.ts b/dist/models/Message.d.ts index a823ce5e..a629f7ee 100644 --- a/dist/models/Message.d.ts +++ b/dist/models/Message.d.ts @@ -1,20 +1,20 @@ /// <reference path="../util/MongoBigInt.d.ts" /> -import { Schema, Types, Document } from "mongoose"; +import { Schema, Document } from "mongoose"; export interface Message { - id: bigint; - channel_id: bigint; - guild_id?: bigint; - author_id?: bigint; - webhook_id?: bigint; - application_id?: bigint; + id: string; + channel_id: string; + guild_id?: string; + author_id?: string; + webhook_id?: string; + application_id?: string; content?: string; timestamp: Date; edited_timestamp?: Date; tts?: boolean; mention_everyone?: boolean; - mention_user_ids: bigint[]; - mention_role_ids: bigint[]; - mention_channels_ids: bigint[]; + mention_user_ids: string[]; + mention_role_ids: string[]; + mention_channels_ids: string[]; attachments: Attachment[]; embeds: Embed[]; reactions: Reaction[]; @@ -28,13 +28,13 @@ export interface Message { flags?: bigint; stickers?: []; message_reference?: { - message_id: bigint; - channel_id?: bigint; - guild_id?: bigint; + message_id: string; + channel_id?: string; + guild_id?: string; }; } export interface MessageDocument extends Document, Message { - id: bigint; + id: string; } export declare enum MessageType { DEFAULT = 0, @@ -56,7 +56,7 @@ export declare enum MessageType { APPLICATION_COMMAND = 20 } export interface Attachment { - id: bigint; + id: string; filename: string; size: number; url: string; @@ -106,18 +106,18 @@ export interface Reaction { emoji: PartialEmoji; } export interface PartialEmoji { - id?: bigint; + id?: string; name: string; animated?: boolean; } export interface AllowedMentions { parse?: ("users" | "roles" | "everyone")[]; - roles?: bigint[]; - users?: bigint[]; + roles?: string[]; + users?: string[]; replied_user?: boolean; } export declare const Attachment: { - id: typeof Types.Long; + id: StringConstructor; filename: StringConstructor; size: NumberConstructor; url: StringConstructor; diff --git a/dist/models/Message.js b/dist/models/Message.js index add929c6..1adca30c 100644 --- a/dist/models/Message.js +++ b/dist/models/Message.js @@ -30,7 +30,7 @@ var MessageType; MessageType[MessageType["APPLICATION_COMMAND"] = 20] = "APPLICATION_COMMAND"; })(MessageType = exports.MessageType || (exports.MessageType = {})); exports.Attachment = { - id: mongoose_1.Types.Long, + id: String, filename: String, size: Number, url: String, @@ -47,7 +47,7 @@ exports.EmbedImage = { const Reaction = { count: Number, emoji: { - id: mongoose_1.Types.Long, + id: String, name: String, animated: Boolean, }, @@ -86,20 +86,20 @@ exports.Embed = { ], }; exports.MessageSchema = new mongoose_1.Schema({ - id: mongoose_1.Types.Long, - channel_id: mongoose_1.Types.Long, - author_id: mongoose_1.Types.Long, - webhook_id: mongoose_1.Types.Long, - guild_id: mongoose_1.Types.Long, - application_id: mongoose_1.Types.Long, + id: String, + channel_id: String, + author_id: String, + webhook_id: String, + guild_id: String, + application_id: String, content: String, timestamp: Date, edited_timestamp: Date, tts: Boolean, mention_everyone: Boolean, - mention_user_ids: [mongoose_1.Types.Long], - mention_role_ids: [mongoose_1.Types.Long], - mention_channel_ids: [mongoose_1.Types.Long], + mention_user_ids: [String], + mention_role_ids: [String], + mention_channel_ids: [String], attachments: [exports.Attachment], embeds: [exports.Embed], reactions: [Reaction], @@ -113,9 +113,9 @@ exports.MessageSchema = new mongoose_1.Schema({ flags: mongoose_1.Types.Long, stickers: [], message_reference: { - message_id: mongoose_1.Types.Long, - channel_id: mongoose_1.Types.Long, - guild_id: mongoose_1.Types.Long, + message_id: String, + channel_id: String, + guild_id: String, }, }); exports.MessageSchema.virtual("author", { diff --git a/dist/models/Message.js.map b/dist/models/Message.js.map index 6e8bb229..e4387a0e 100644 --- a/dist/models/Message.js.map +++ b/dist/models/Message.js.map @@ -1 +1 @@ -{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAClC,iCAAmC;AACnC,qCAAuC;AACvC,iCAAmC;AAwCnC,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,+DAAiB,CAAA;IACjB,qEAAoB,CAAA;IACpB,6CAAQ,CAAA;IACR,2EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,iFAA0B,CAAA;IAC1B,uEAAqB,CAAA;IACrB,mGAAmC,CAAA;IACnC,iHAA0C,CAAA;IAC1C,kHAA2C,CAAA;IAC3C,kHAA2C,CAAA;IAC3C,0EAAuB,CAAA;IACvB,8FAAiC,CAAA;IACjC,4FAAgC,CAAA;IAChC,gDAAU,CAAA;IACV,4EAAwB,CAAA;AACzB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB;AAsEY,QAAA,UAAU,GAAG;IACzB,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,SAAS,EAAE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EAAE,kBAAkB;IAC9B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,qBAAa,CAAC,OAAO,CAAC,eAAe,EAAE;IACtC,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,qBAAa,CAAC,OAAO,CAAC,kBAAkB,EAAE;IACzC,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,kCAAkC;AAClC,yCAAyC;AACzC,qBAAqB;AACrB,mCAAmC;AACnC,uBAAuB;AACvB,kBAAkB;AAClB,MAAM;AAEN,aAAa;AACA,QAAA,YAAY,GAAG,kBAAE,CAAC,KAAK,CAAkB,SAAS,EAAE,qBAAa,EAAE,UAAU,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAClC,iCAAmC;AACnC,qCAAuC;AACvC,iCAAmC;AAwCnC,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,+DAAiB,CAAA;IACjB,qEAAoB,CAAA;IACpB,6CAAQ,CAAA;IACR,2EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,iFAA0B,CAAA;IAC1B,uEAAqB,CAAA;IACrB,mGAAmC,CAAA;IACnC,iHAA0C,CAAA;IAC1C,kHAA2C,CAAA;IAC3C,kHAA2C,CAAA;IAC3C,0EAAuB,CAAA;IACvB,8FAAiC,CAAA;IACjC,4FAAgC,CAAA;IAChC,gDAAU,CAAA;IACV,4EAAwB,CAAA;AACzB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB;AAsEY,QAAA,UAAU,GAAG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AAI;CACb,CAAC,CAAC;AAEH,qBAAa,CAAC,OAAO,CAAC,eAAe,EAAE;IACtC,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,qBAAa,CAAC,OAAO,CAAC,kBAAkB,EAAE;IACzC,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,kBAAkB;IAC9B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,kCAAkC;AAClC,yCAAyC;AACzC,qBAAqB;AACrB,mCAAmC;AACnC,uBAAuB;AACvB,kBAAkB;AAClB,MAAM;AAEN,aAAa;AACA,QAAA,YAAY,GAAG,kBAAE,CAAC,KAAK,CAAkB,SAAS,EAAE,qBAAa,EAAE,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/Role.d.ts b/dist/models/Role.d.ts index 6a3f1669..d6765283 100644 --- a/dist/models/Role.d.ts +++ b/dist/models/Role.d.ts @@ -1,8 +1,8 @@ /// <reference path="../util/MongoBigInt.d.ts" /> import { Schema, Document } from "mongoose"; export interface Role { - id: bigint; - guild_id: bigint; + id: string; + guild_id: string; color: number; hoist: boolean; managed: boolean; @@ -11,11 +11,11 @@ export interface Role { permissions: bigint; position: number; tags?: { - bot_id?: bigint; + bot_id?: string; }; } export interface RoleDocument extends Document, Role { - id: bigint; + id: string; } export declare const RoleSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>; export declare const RoleModel: import("mongoose").Model<RoleDocument>; diff --git a/dist/models/Role.js b/dist/models/Role.js index ed681849..86c06db9 100644 --- a/dist/models/Role.js +++ b/dist/models/Role.js @@ -7,8 +7,8 @@ exports.RoleModel = exports.RoleSchema = void 0; const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.RoleSchema = new mongoose_1.Schema({ - id: mongoose_1.Types.Long, - guild_id: mongoose_1.Types.Long, + id: String, + guild_id: String, color: Number, hoist: Boolean, managed: Boolean, @@ -17,7 +17,7 @@ exports.RoleSchema = new mongoose_1.Schema({ permissions: mongoose_1.Types.Long, position: Number, tags: { - bot_id: mongoose_1.Types.Long, + bot_id: String, }, }); // @ts-ignore diff --git a/dist/models/Role.js.map b/dist/models/Role.js.map index b3ed1758..87872154 100644 --- a/dist/models/Role.js.map +++ b/dist/models/Role.js.map @@ -1 +1 @@ -{"version":3,"file":"Role.js","sourceRoot":"","sources":["../../src/models/Role.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAqBrB,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAC;IACpC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,gBAAK,CAAC,IAAI;IACvB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE;QACL,MAAM,EAAE,gBAAK,CAAC,IAAI;KAClB;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,SAAS,GAAG,kBAAE,CAAC,KAAK,CAAe,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Role.js","sourceRoot":"","sources":["../../src/models/Role.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA0D;AAC1D,gEAAkC;AAqBrB,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAC;IACpC,EAAE,EAAE,MAAM;IACV,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,gBAAK,CAAC,IAAI;IACvB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE;QACL,MAAM,EAAE,MAAM;KACd;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,SAAS,GAAG,kBAAE,CAAC,KAAK,CAAe,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/User.d.ts b/dist/models/User.d.ts index 109dd177..ae101061 100644 --- a/dist/models/User.d.ts +++ b/dist/models/User.d.ts @@ -3,7 +3,7 @@ import { Activity } from "./Activity"; import { ClientStatus, Status } from "./Status"; import { Schema, Document } from "mongoose"; export interface User { - id: bigint; + id: string; username: string; discriminator: string; avatar: string | null; @@ -23,7 +23,7 @@ export interface User { flags: bigint; public_flags: bigint; user_settings: UserSettings; - guilds: bigint[]; + guilds: string[]; user_data: UserData; presence: { status: Status; @@ -39,10 +39,10 @@ export interface UserData { fingerprints: string[]; } export interface UserDocument extends User, Document { - id: bigint; + id: string; } export interface PublicUser { - id: bigint; + id: string; discriminator: string; username: string; avatar?: string; @@ -60,10 +60,10 @@ export interface ConnectedAccount { visibility: number; } export interface Relationship { - id: bigint; + id: string; nickname?: string; type: number; - user_id: bigint; + user_id: string; } export interface UserSettings { afk_timeout: number; @@ -73,7 +73,7 @@ export interface UserSettings { contact_sync_enabled: boolean; convert_emoticons: boolean; custom_status: { - emoji_id: bigint | null; + emoji_id: string | null; emoji_name: string | null; expires_at: number | null; text: string | null; @@ -91,11 +91,11 @@ export interface UserSettings { gif_auto_play: boolean; guild_folders: { color: number; - guild_ids: bigint[]; + guild_ids: string[]; id: number; name: string; }[]; - guild_positions: bigint[]; + guild_positions: string[]; inline_attachment_media: boolean; inline_embed_media: boolean; locale: string; @@ -103,7 +103,7 @@ export interface UserSettings { native_phone_integration_enabled: boolean; render_embeds: boolean; render_reactions: boolean; - restricted_guilds: bigint[]; + restricted_guilds: string[]; show_current_game: boolean; status: "online" | "offline" | "dnd" | "idle"; stream_notifications_enabled: boolean; diff --git a/dist/models/User.js b/dist/models/User.js index 7c98f27e..3ba04503 100644 --- a/dist/models/User.js +++ b/dist/models/User.js @@ -9,7 +9,7 @@ const Status_1 = require("./Status"); const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.UserSchema = new mongoose_1.Schema({ - id: mongoose_1.Types.Long, + id: String, username: String, discriminator: String, avatar: String, @@ -28,17 +28,17 @@ exports.UserSchema = new mongoose_1.Schema({ email: String, flags: mongoose_1.Types.Long, public_flags: mongoose_1.Types.Long, - guilds: [mongoose_1.Types.Long], + guilds: [String], user_data: { fingerprints: [String], hash: String, valid_tokens_since: Date, relationships: [ { - id: mongoose_1.Types.Long, + id: String, nickname: String, type: Number, - user_id: mongoose_1.Types.Long, + user_id: String, }, ], connected_accounts: [ @@ -63,7 +63,7 @@ exports.UserSchema = new mongoose_1.Schema({ contact_sync_enabled: Boolean, convert_emoticons: Boolean, custom_status: { - emoji_id: mongoose_1.Types.Long, + emoji_id: String, emoji_name: String, expires_at: Number, text: String, @@ -81,12 +81,12 @@ exports.UserSchema = new mongoose_1.Schema({ guild_folders: [ { color: Number, - guild_ids: [mongoose_1.Types.Long], + guild_ids: [String], id: Number, name: String, }, ], - guild_positions: [mongoose_1.Types.Long], + guild_positions: [String], inline_attachment_media: Boolean, inline_embed_media: Boolean, locale: String, @@ -94,7 +94,7 @@ exports.UserSchema = new mongoose_1.Schema({ native_phone_integration_enabled: Boolean, render_embeds: Boolean, render_reactions: Boolean, - restricted_guilds: [mongoose_1.Types.Long], + restricted_guilds: [String], show_current_game: Boolean, status: String, stream_notifications_enabled: Boolean, diff --git a/dist/models/User.js.map b/dist/models/User.js.map index 03a92cb6..d57da8db 100644 --- a/dist/models/User.js.map +++ b/dist/models/User.js.map @@ -1 +1 @@ -{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAsC;AACtC,qCAAgD;AAChD,uCAAmD;AACnD,gEAAkC;AAqHrB,QAAA,UAAU,GAAG,IA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CAAC"} \ No newline at end of file +{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAsC;AACtC,qCAAgD;AAChD,uCAAmD;AACnD,gEAAkC;AAqHrB,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAC;IACpC,EAAE,EAAE,MAAM;IACV,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,MAAM;IACpB,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,gBAAK,CAAC,IAAI;IACjB,YAAY,EAAE,gBAAK,CAAC,IAAI;IACxB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACV,YAAY,EAAE,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM;QACZ,kBAAkB,EAAE,IAAI;QACxB,aAAa,EAAE;YACd;gBACC,EAAE,EAAE,MAAM;gBACV,QAAQ,EAAE,MAAM;gBAChB,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,MAAM;aACf;SACD;QACD,kBAAkB,EAAE;YACnB;gBACC,YAAY,EAAE,MAAM;gBACpB,WAAW,EAAE,OAAO;gBACpB,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,OAAO;gBAChB,aAAa,EAAE,OAAO;gBACtB,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,OAAO;gBAChB,UAAU,EAAE,MAAM;aAClB;SACD;KACD;IACD,aAAa,EAAE;QACd,WAAW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,kBAAE,CAAC,KAAK,CAAe,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/models/VoiceState.d.ts b/dist/models/VoiceState.d.ts index 50faa253..cf0fa523 100644 --- a/dist/models/VoiceState.d.ts +++ b/dist/models/VoiceState.d.ts @@ -1,9 +1,9 @@ /// <reference path="../util/MongoBigInt.d.ts" /> import { Schema, Document } from "mongoose"; export interface VoiceState extends Document { - guild_id?: bigint; - channel_id: bigint; - user_id: bigint; + guild_id?: string; + channel_id: string; + user_id: string; session_id: string; deaf: boolean; mute: boolean; diff --git a/dist/models/VoiceState.js b/dist/models/VoiceState.js index c646879c..d96a5ad4 100644 --- a/dist/models/VoiceState.js +++ b/dist/models/VoiceState.js @@ -7,9 +7,9 @@ exports.VoiceStateModel = exports.VoiceSateSchema = void 0; const mongoose_1 = require("mongoose"); const Database_1 = __importDefault(require("../util/Database")); exports.VoiceSateSchema = new mongoose_1.Schema({ - guild_id: mongoose_1.Types.Long, - channel_id: mongoose_1.Types.Long, - user_id: mongoose_1.Types.Long, + guild_id: String, + channel_id: String, + user_id: String, session_id: String, deaf: Boolean, mute: Boolean, diff --git a/dist/models/VoiceState.js.map b/dist/models/VoiceState.js.map index 1e21605d..1e7905d8 100644 --- a/dist/models/VoiceState.js.map +++ b/dist/models/VoiceState.js.map @@ -1 +1 @@ -{"version":3,"file":"VoiceState.js","sourceRoot":"","sources":["../../src/models/VoiceState.ts"],"names":[],"mappings":";;;;;;AACA,uCAA0D;AAC1D,gEAAkC;AAgBrB,QAAA,eAAe,GAAG,IAAI,iBAAM,CAAC;IACzC,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,UAAU,EAAE,gBAAK,CAAC,IAAI;IACtB,OAAO,EAAE,gBAAK,CAAC,IAAI;IACnB,UAAU,EAAE,MAAM;IAClB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,eAAe,GAAG,kBAAE,CAAC,KAAK,CAAa,YAAY,EAAE,uBAAe,EAAE,aAAa,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"VoiceState.js","sourceRoot":"","sources":["../../src/models/VoiceState.ts"],"names":[],"mappings":";;;;;;AACA,uCAA0D;AAC1D,gEAAkC;AAgBrB,QAAA,eAAe,GAAG,IAAI,iBAAM,CAAC;IACzC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,MAAM;IAClB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE,OAAO;IAClB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,OAAO;IACnB,QAAQ,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,eAAe,GAAG,kBAAE,CAAC,KAAK,CAAa,YAAY,EAAE,uBAAe,EAAE,aAAa,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/util/Permissions.d.ts b/dist/util/Permissions.d.ts index 1cedf036..19135666 100644 --- a/dist/util/Permissions.d.ts +++ b/dist/util/Permissions.d.ts @@ -48,8 +48,8 @@ export declare class Permissions extends BitField { static rolePermission(roles: Role[]): bigint; static finalPermission({ user, guild, channel, }: { user: { - id: bigint; - roles: bigint[]; + id: string; + roles: string[]; }; guild: { roles: Role[]; @@ -59,7 +59,7 @@ export declare class Permissions extends BitField { }; }): bigint; } -export declare function getPermission(user_id: bigint, guild_id: bigint, channel_id?: bigint, cache?: { +export declare function getPermission(user_id: string, guild_id: string, channel_id?: string, cache?: { channel?: ChannelDocument | null; member?: MemberDocument | null; }): Promise<Permissions>; diff --git a/src/models/Activity.ts b/src/models/Activity.ts index bf77856f..340590c4 100644 --- a/src/models/Activity.ts +++ b/src/models/Activity.ts @@ -4,7 +4,7 @@ import { Schema, model, Types, Document } from "mongoose"; export interface Presence { user: User; - guild_id?: bigint; + guild_id?: string; status: Status; activities: Activity[]; client_status: ClientStatus; @@ -19,12 +19,12 @@ export interface Activity { start?: number; end?: number; }[]; - application_id?: bigint; + application_id?: string; details?: string; state?: string; emoji?: { name: string; - id?: bigint; + id?: string; amimated?: boolean; }; party?: { @@ -57,12 +57,12 @@ export const Activity = { $end: Number, }, ], - $application_id: Types.Long, + $application_id: String, $details: String, $state: String, $emoji: { $name: String, - $id: Types.Long, + $id: String, $amimated: Boolean, }, $party: { diff --git a/src/models/Application.ts b/src/models/Application.ts index ea443dc9..4c519ff2 100644 --- a/src/models/Application.ts +++ b/src/models/Application.ts @@ -1,6 +1,6 @@ export interface ApplicationCommand { - id: bigint; - application_id: bigint; + id: string; + application_id: string; name: string; description: string; options?: ApplicationCommandOption[]; @@ -32,7 +32,7 @@ export enum ApplicationCommandOptionType { } export interface ApplicationCommandInteractionData { - id: bigint; + id: string; name: string; options?: ApplicationCommandInteractionDataOption[]; } diff --git a/src/models/AuditLog.ts b/src/models/AuditLog.ts index a0f91a82..c1f83c13 100644 --- a/src/models/AuditLog.ts +++ b/src/models/AuditLog.ts @@ -11,17 +11,17 @@ export interface AuditLogResponse { } export interface AuditLogEntries { - target_id?: bigint; - user_id: bigint; - id: bigint; + target_id?: string; + user_id: string; + id: string; action_type: AuditLogEvents; options?: { delete_member_days?: string; members_removed?: string; - channel_id?: bigint; - messaged_id?: bigint; + channel_id?: string; + messaged_id?: string; count?: string; - id?: bigint; + id?: string; type?: string; role_name?: string; }; @@ -42,13 +42,13 @@ export interface AuditLogChangeValue { splash_hash?: string; discovery_splash_hash?: string; banner_hash?: string; - owner_id?: bigint; + owner_id?: string; region?: string; preferred_locale?: string; - afk_channel_id?: bigint; + afk_channel_id?: string; afk_timeout?: number; - rules_channel_id?: bigint; - public_updates_channel_id?: bigint; + rules_channel_id?: string; + public_updates_channel_id?: string; mfa_level?: number; verification_level?: number; explicit_content_filter?: number; @@ -58,14 +58,14 @@ export interface AuditLogChangeValue { $remove?: {}[]; prune_delete_days?: number; widget_enabled?: boolean; - widget_channel_id?: bigint; - system_channel_id?: bigint; + widget_channel_id?: string; + system_channel_id?: string; position?: number; topic?: string; bitrate?: number; permission_overwrites?: ChannelPermissionOverwrite[]; nsfw?: boolean; - application_id?: bigint; + application_id?: string; rate_limit_per_user?: number; permissions?: string; color?: number; @@ -74,8 +74,8 @@ export interface AuditLogChangeValue { allow?: string; deny?: string; code?: string; - channel_id?: bigint; - inviter_id?: bigint; + channel_id?: string; + inviter_id?: string; max_uses?: number; uses?: number; max_age?: number; @@ -84,7 +84,7 @@ export interface AuditLogChangeValue { mute?: boolean; nick?: string; avatar_hash?: string; - id?: bigint; + id?: string; type?: number; enable_emoticons?: boolean; expire_behavior?: number; @@ -93,7 +93,7 @@ export interface AuditLogChangeValue { } export interface AuditLogEntriesDocument extends Document, AuditLogEntries { - id: bigint; + id: string; } export const AuditLogChanges = { @@ -103,13 +103,13 @@ export const AuditLogChanges = { splash_hash: String, discovery_splash_hash: String, banner_hash: String, - owner_id: Types.Long, + owner_id: String, region: String, preferred_locale: String, - afk_channel_id: Types.Long, + afk_channel_id: String, afk_timeout: Number, - rules_channel_id: Types.Long, - public_updates_channel_id: Types.Long, + rules_channel_id: String, + public_updates_channel_id: String, mfa_level: Number, verification_level: Number, explicit_content_filter: Number, @@ -119,14 +119,14 @@ export const AuditLogChanges = { $remove: [{}], prune_delete_days: Number, widget_enabled: Boolean, - widget_channel_id: Types.Long, - system_channel_id: Types.Long, + widget_channel_id: String, + system_channel_id: String, position: Number, topic: String, bitrate: Number, permission_overwrites: [{}], nsfw: Boolean, - application_id: Types.Long, + application_id: String, rate_limit_per_user: Number, permissions: String, color: Number, @@ -135,8 +135,8 @@ export const AuditLogChanges = { allow: String, deny: String, code: String, - channel_id: Types.Long, - inviter_id: Types.Long, + channel_id: String, + inviter_id: String, max_uses: Number, uses: Number, max_age: Number, @@ -145,7 +145,7 @@ export const AuditLogChanges = { mute: Boolean, nick: String, avatar_hash: String, - id: Types.Long, + id: String, type: Number, enable_emoticons: Boolean, expire_behavior: Number, @@ -154,17 +154,17 @@ export const AuditLogChanges = { }; export const AuditLogSchema = new Schema({ - target_id: Types.Long, - user_id: { type: Types.Long, required: true }, - id: { type: Types.Long, required: true }, + target_id: String, + user_id: { type: String, required: true }, + id: { type: String, required: true }, action_type: { type: Number, required: true }, options: { delete_member_days: String, members_removed: String, - channel_id: Types.Long, - messaged_id: Types.Long, + channel_id: String, + messaged_id: String, count: String, - id: Types.Long, + id: String, type: String, role_name: String, }, diff --git a/src/models/Ban.ts b/src/models/Ban.ts index 8fc3b124..27893029 100644 --- a/src/models/Ban.ts +++ b/src/models/Ban.ts @@ -2,17 +2,17 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Ban extends Document { - user_id: bigint; - guild_id: bigint; - executor_id: bigint; + user_id: string; + guild_id: string; + executor_id: string; ip: string; reason?: string; } export const BanSchema = new Schema({ - user_id: { type: Types.Long, required: true }, - guild_id: { type: Types.Long, required: true }, - executor_id: { type: Types.Long, required: true }, + user_id: { type: String, required: true }, + guild_id: { type: String, required: true }, + executor_id: { type: String, required: true }, reason: String, ip: String, // ? Should we store this in here, or in the UserModel? }); diff --git a/src/models/Channel.ts b/src/models/Channel.ts index bf03c939..82ad2999 100644 --- a/src/models/Channel.ts +++ b/src/models/Channel.ts @@ -4,20 +4,20 @@ import db from "../util/Database"; export interface AnyChannel extends Channel, DMChannel, TextChannel, VoiceChannel {} export interface ChannelDocument extends Document, AnyChannel { - id: bigint; + id: string; } export const ChannelSchema = new Schema({ - id: Types.Long, + id: String, created_at: { type: Schema.Types.Date, required: true }, name: { type: String, required: true }, type: { type: Number, required: true }, - guild_id: Types.Long, - owner_id: Types.Long, - parent_id: Types.Long, - recipients: [Types.Long], + guild_id: String, + owner_id: String, + parent_id: String, + recipients: [String], position: Number, - last_message_id: Types.Long, + last_message_id: String, last_pin_timestamp: Date, nsfw: Boolean, rate_limit_per_user: Number, @@ -26,7 +26,7 @@ export const ChannelSchema = new Schema({ { allow: Types.Long, deny: Types.Long, - id: Types.Long, + id: String, type: Number, }, ], @@ -36,28 +36,28 @@ export const ChannelSchema = new Schema({ export const ChannelModel = db.model<ChannelDocument>("Channel", ChannelSchema, "channels"); export interface Channel { - id: bigint; + id: string; created_at: Date; name: string; type: number; } export interface TextBasedChannel { - last_message_id?: bigint; + last_message_id?: string; last_pin_timestamp?: number; } export interface GuildChannel extends Channel { - guild_id: bigint; + guild_id: string; position: number; - parent_id?: bigint; + parent_id?: string; permission_overwrites: ChannelPermissionOverwrite[]; } export interface ChannelPermissionOverwrite { - allow: bigint; - deny: bigint; - id: bigint; + allow: bigint; // for bitfields we use bigints + deny: bigint; // for bitfields we use bigints + id: string; type: ChannelPermissionOverwriteType; } @@ -75,8 +75,8 @@ export interface TextChannel extends GuildChannel, TextBasedChannel { } export interface DMChannel extends Channel, TextBasedChannel { - owner_id: bigint; - recipients: bigint[]; + owner_id: string; + recipients: string[]; } export enum ChannelType { diff --git a/src/models/Emoji.ts b/src/models/Emoji.ts index 530c2cc7..3e5cad53 100644 --- a/src/models/Emoji.ts +++ b/src/models/Emoji.ts @@ -2,27 +2,27 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Emoji extends Document { - id: bigint; + id: string; animated: boolean; available: boolean; - guild_id: bigint; + guild_id: string; managed: boolean; name: string; require_colons: boolean; url: string; - roles: bigint[]; // roles this emoji is whitelisted to + roles: string[]; // roles this emoji is whitelisted to (new discord feature?) } export const EmojiSchema = new Schema({ - id: { type: Types.Long, required: true }, + id: { type: String, required: true }, animated: Boolean, available: Boolean, - guild_id: Types.Long, + guild_id: String, managed: Boolean, name: String, require_colons: Boolean, url: String, - roles: [Types.Long], + roles: [String], }); // @ts-ignore diff --git a/src/models/Event.ts b/src/models/Event.ts index 97da98c0..9a5b5283 100644 --- a/src/models/Event.ts +++ b/src/models/Event.ts @@ -14,9 +14,9 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Event { - guild_id?: bigint; - user_id?: bigint; - channel_id?: bigint; + guild_id?: string; + user_id?: string; + channel_id?: string; created_at?: Date; event: EVENT; data?: any; @@ -25,9 +25,9 @@ export interface Event { export interface EventDocument extends Event, Document {} export const EventSchema = new Schema({ - guild_id: Types.Long, - user_id: Types.Long, - channel_id: Types.Long, + guild_id: String, + user_id: String, + channel_id: String, created_at: { type: Date, required: true }, event: { type: String, required: true }, data: Object, @@ -98,7 +98,7 @@ export interface ReadyEventData { partial: boolean; }; application?: { - id: bigint; + id: string; flags: bigint; }; merged_members?: Omit<Member, "settings" | "user">[][]; @@ -106,7 +106,7 @@ export interface ReadyEventData { users?: { avatar?: string; discriminator: string; - id: bigint; + id: string; username: string; bot: boolean; public_flags: bigint; @@ -136,8 +136,8 @@ export interface ChannelDeleteEvent extends Event { export interface ChannelPinsUpdateEvent extends Event { event: "CHANNEL_PINS_UPDATE"; data: { - guild_id?: bigint; - channel_id: bigint; + guild_id?: string; + channel_id: string; last_pin_timestamp: number; }; } @@ -155,7 +155,7 @@ export interface GuildUpdateEvent extends Event { export interface GuildDeleteEvent extends Event { event: "GUILD_DELETE"; data: { - id: bigint; + id: string; unavailable?: boolean; }; } @@ -163,7 +163,7 @@ export interface GuildDeleteEvent extends Event { export interface GuildBanAddEvent extends Event { event: "GUILD_BAN_ADD"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } @@ -171,7 +171,7 @@ export interface GuildBanAddEvent extends Event { export interface GuildBanRemoveEvent extends Event { event: "GUILD_BAN_REMOVE"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } @@ -179,7 +179,7 @@ export interface GuildBanRemoveEvent extends Event { export interface GuildEmojiUpdateEvent extends Event { event: "GUILD_EMOJI_UPDATE"; data: { - guild_id: bigint; + guild_id: string; emojis: Emoji[]; }; } @@ -187,21 +187,21 @@ export interface GuildEmojiUpdateEvent extends Event { export interface GuildIntegrationUpdateEvent extends Event { event: "GUILD_INTEGRATIONS_UPDATE"; data: { - guild_id: bigint; + guild_id: string; }; } export interface GuildMemberAddEvent extends Event { event: "GUILD_MEMBER_ADD"; data: PublicMember & { - guild_id: bigint; + guild_id: string; }; } export interface GuildMemberRemoveEvent extends Event { event: "GUILD_MEMBER_REMOVE"; data: { - guild_id: bigint; + guild_id: string; user: User; }; } @@ -209,8 +209,8 @@ export interface GuildMemberRemoveEvent extends Event { export interface GuildMemberUpdateEvent extends Event { event: "GUILD_MEMBER_UPDATE"; data: { - guild_id: bigint; - roles: bigint[]; + guild_id: string; + roles: string[]; user: User; nick?: string; joined_at: Date; @@ -222,11 +222,11 @@ export interface GuildMemberUpdateEvent extends Event { export interface GuildMembersChunkEvent extends Event { event: "GUILD_MEMBERS_CHUNK"; data: { - guild_id: bigint; + guild_id: string; members: PublicMember[]; chunk_index: number; chunk_count: number; - not_found: bigint[]; + not_found: string[]; presences: Presence[]; nonce?: string; }; @@ -235,7 +235,7 @@ export interface GuildMembersChunkEvent extends Event { export interface GuildRoleCreateEvent extends Event { event: "GUILD_ROLE_CREATE"; data: { - guild_id: bigint; + guild_id: string; role: Role; }; } @@ -243,7 +243,7 @@ export interface GuildRoleCreateEvent extends Event { export interface GuildRoleUpdateEvent extends Event { event: "GUILD_ROLE_UPDATE"; data: { - guild_id: bigint; + guild_id: string; role: Role; }; } @@ -251,31 +251,31 @@ export interface GuildRoleUpdateEvent extends Event { export interface GuildRoleDeleteEvent extends Event { event: "GUILD_ROLE_DELETE"; data: { - guild_id: bigint; - role_id: bigint; + guild_id: string; + role_id: string; }; } export interface InviteCreateEvent extends Event { event: "INVITE_CREATE"; data: Omit<Invite, "guild" | "channel"> & { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; }; } export interface InviteDeleteEvent extends Event { event: "INVITE_DELETE"; data: { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; code: string; }; } export type MessagePayload = Omit<Message, "author_id"> & { - channel_id: bigint; - guild_id?: bigint; + channel_id: string; + guild_id?: string; author: User; member: PublicMember; mentions: (User & { member: PublicMember })[]; @@ -294,28 +294,28 @@ export interface MessageUpdateEvent extends Event { export interface MessageDeleteEvent extends Event { event: "MESSAGE_DELETE"; data: { - id: bigint; - channel_id: bigint; - guild_id?: bigint; + id: string; + channel_id: string; + guild_id?: string; }; } export interface MessageDeleteBulkEvent extends Event { event: "MESSAGE_DELETE_BULK"; data: { - ids: bigint[]; - channel_id: bigint; - guild_id?: bigint; + ids: string[]; + channel_id: string; + guild_id?: string; }; } export interface MessageReactionAddEvent extends Event { event: "MESSAGE_REACTION_ADD"; data: { - user_id: bigint; - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + user_id: string; + channel_id: string; + message_id: string; + guild_id?: string; member?: PublicMember; emoji: PartialEmoji; }; @@ -324,10 +324,10 @@ export interface MessageReactionAddEvent extends Event { export interface MessageReactionRemoveEvent extends Event { event: "MESSAGE_REACTION_REMOVE"; data: { - user_id: bigint; - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + user_id: string; + channel_id: string; + message_id: string; + guild_id?: string; emoji: PartialEmoji; }; } @@ -335,18 +335,18 @@ export interface MessageReactionRemoveEvent extends Event { export interface MessageReactionRemoveAllEvent extends Event { event: "MESSAGE_REACTION_REMOVE_ALL"; data: { - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + channel_id: string; + message_id: string; + guild_id?: string; }; } export interface MessageReactionRemoveEmojiEvent extends Event { event: "MESSAGE_REACTION_REMOVE_EMOJI"; data: { - channel_id: bigint; - message_id: bigint; - guild_id?: bigint; + channel_id: string; + message_id: string; + guild_id?: string; emoji: PartialEmoji; }; } @@ -359,10 +359,10 @@ export interface PresenceUpdateEvent extends Event { export interface TypingStartEvent extends Event { event: "TYPING_START"; data: { - channel_id: bigint; - user_id: bigint; + channel_id: string; + user_id: string; timestamp: number; - guild_id?: bigint; + guild_id?: string; member?: PublicMember; }; } @@ -383,7 +383,7 @@ export interface VoiceServerUpdateEvent extends Event { event: "VOICE_SERVER_UPDATE"; data: { token: string; - guild_id: bigint; + guild_id: string; endpoint: string; }; } @@ -391,13 +391,13 @@ export interface VoiceServerUpdateEvent extends Event { export interface WebhooksUpdateEvent extends Event { event: "WEBHOOKS_UPDATE"; data: { - guild_id: bigint; - channel_id: bigint; + guild_id: string; + channel_id: string; }; } export type ApplicationCommandPayload = ApplicationCommand & { - guild_id: bigint; + guild_id: string; }; export interface ApplicationCommandCreateEvent extends Event { diff --git a/src/models/Guild.ts b/src/models/Guild.ts index a92a60cf..d3f098ea 100644 --- a/src/models/Guild.ts +++ b/src/models/Guild.ts @@ -6,14 +6,14 @@ import { MemberModel } from "./Member"; import { RoleModel } from "./Role"; export interface GuildDocument extends Document, Guild { - id: bigint; + id: string; } export interface Guild { - id: bigint; - afk_channel_id?: bigint; + id: string; + afk_channel_id?: string; afk_timeout?: number; - application_id?: bigint; + application_id?: string; banner?: string; default_message_notifications?: number; description?: string; @@ -34,29 +34,29 @@ export interface Guild { // voice_states: []; // * voice_states are stored in a seperate collection mfa_level?: number; name: string; - owner_id: bigint; + owner_id: string; preferred_locale?: string; // only community guilds can choose this premium_subscription_count?: number; premium_tier?: number; // nitro boost level - public_updates_channel_id?: bigint; + public_updates_channel_id?: string; region?: string; - rules_channel_id?: bigint; + rules_channel_id?: string; splash?: string; system_channel_flags?: number; - system_channel_id?: bigint; + system_channel_id?: string; unavailable?: boolean; vanity_url_code?: string; verification_level?: number; welcome_screen: []; // welcome splash screen if a user joins guild - widget_channel_id?: bigint; + widget_channel_id?: string; widget_enabled?: boolean; } export const GuildSchema = new Schema({ - id: { type: Types.Long, required: true }, - afk_channel_id: Types.Long, + id: { type: String, required: true }, + afk_channel_id: String, afk_timeout: Number, - application_id: Types.Long, + application_id: String, banner: String, default_message_notifications: Number, description: String, @@ -72,22 +72,22 @@ export const GuildSchema = new Schema({ presence_count: Number, mfa_level: Number, name: { type: String, required: true }, - owner_id: { type: Types.Long, required: true }, + owner_id: { type: String, required: true }, preferred_locale: String, premium_subscription_count: Number, premium_tier: Number, - public_updates_channel_id: Types.Long, + public_updates_channel_id: String, region: String, - rules_channel_id: Types.Long, + rules_channel_id: String, splash: String, system_channel_flags: Number, - system_channel_id: Types.Long, + system_channel_id: String, unavailable: Boolean, vanity_url_code: String, verification_level: Number, voice_states: { type: [Object], default: [] }, welcome_screen: { type: [Object], default: [] }, - widget_channel_id: Types.Long, + widget_channel_id: String, widget_enabled: Boolean, }); diff --git a/src/models/Interaction.ts b/src/models/Interaction.ts index 6f36c14a..764247a5 100644 --- a/src/models/Interaction.ts +++ b/src/models/Interaction.ts @@ -1,12 +1,12 @@ import { AllowedMentions, Embed } from "./Message"; export interface Interaction { - id: bigint; + id: string; type: InteractionType; data?: {}; - guild_id: bigint; - channel_id: bigint; - member_id: bigint; + guild_id: string; + channel_id: string; + member_id: string; token: string; version: number; } diff --git a/src/models/Invite.ts b/src/models/Invite.ts index fc60b93c..590a4598 100644 --- a/src/models/Invite.ts +++ b/src/models/Invite.ts @@ -8,14 +8,13 @@ export interface Invite extends Document { max_uses: number; max_age: number; created_at: Date; - guild_id: bigint; - channel_id: bigint; - inviter_id: bigint; + guild_id: string; + channel_id: string; + inviter_id: string; - //! What the fucking shit is this - target_user_id?: bigint; + // ? What the fucking shit is this + target_user_id?: string; target_user_type?: number; - // ! } export const InviteSchema = new Schema({ @@ -25,14 +24,13 @@ export const InviteSchema = new Schema({ max_uses: Number, max_age: Number, created_at: Date, - guild_id: Types.Long, - channel_id: Types.Long, - inviter_id: Types.Long, + guild_id: String, + channel_id: String, + inviter_id: String, - //! What the fucking shit is this - target_user_id: Types.Long, + // ? What the fucking shit is this + target_user_id: String, target_user_type: Number, - // ! }); // @ts-ignore diff --git a/src/models/Member.ts b/src/models/Member.ts index 145b5df4..fc9d5b99 100644 --- a/src/models/Member.ts +++ b/src/models/Member.ts @@ -3,10 +3,10 @@ import { Schema, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Member { - id: bigint; - guild_id: bigint; + id: string; + guild_id: string; nick?: string; - roles: bigint[]; + roles: string[]; joined_at: Date; premium_since?: number; deaf: boolean; @@ -17,12 +17,12 @@ export interface Member { } export interface MemberDocument extends Member, Document { - id: bigint; + id: string; } export interface UserGuildSettings { channel_overrides: { - channel_id: bigint; + channel_id: string; message_notifications: number; mute_config: MuteConfig; muted: boolean; @@ -47,10 +47,10 @@ const MuteConfig = { }; export const MemberSchema = new Schema({ - id: { type: Types.Long, required: true }, - guild_id: Types.Long, + id: { type: String, required: true }, + guild_id: String, nick: String, - roles: [Types.Long], + roles: [String], joined_at: Date, premium_since: Number, deaf: Boolean, @@ -59,7 +59,7 @@ export const MemberSchema = new Schema({ settings: { channel_overrides: [ { - channel_id: Types.Long, + channel_id: String, message_notifications: Number, mute_config: MuteConfig, muted: Boolean, diff --git a/src/models/Message.ts b/src/models/Message.ts index e80ec1f8..4adf8024 100644 --- a/src/models/Message.ts +++ b/src/models/Message.ts @@ -5,20 +5,20 @@ import { MemberModel } from "./Member"; import { RoleModel } from "./Role"; export interface Message { - id: bigint; - channel_id: bigint; - guild_id?: bigint; - author_id?: bigint; - webhook_id?: bigint; - application_id?: bigint; + id: string; + channel_id: string; + guild_id?: string; + author_id?: string; + webhook_id?: string; + application_id?: string; content?: string; timestamp: Date; edited_timestamp?: Date; tts?: boolean; mention_everyone?: boolean; - mention_user_ids: bigint[]; - mention_role_ids: bigint[]; - mention_channels_ids: bigint[]; + mention_user_ids: string[]; + mention_role_ids: string[]; + mention_channels_ids: string[]; attachments: Attachment[]; embeds: Embed[]; reactions: Reaction[]; @@ -32,14 +32,14 @@ export interface Message { flags?: bigint; stickers?: []; message_reference?: { - message_id: bigint; - channel_id?: bigint; - guild_id?: bigint; + message_id: string; + channel_id?: string; + guild_id?: string; }; } export interface MessageDocument extends Document, Message { - id: bigint; + id: string; } export enum MessageType { @@ -63,7 +63,7 @@ export enum MessageType { } export interface Attachment { - id: bigint; // attachment id + id: string; // attachment id filename: string; // name of file attached size: number; // size of file in bytes url: string; // source url of file @@ -118,20 +118,20 @@ export interface Reaction { } export interface PartialEmoji { - id?: bigint; + id?: string; name: string; animated?: boolean; } export interface AllowedMentions { parse?: ("users" | "roles" | "everyone")[]; - roles?: bigint[]; - users?: bigint[]; + roles?: string[]; + users?: string[]; replied_user?: boolean; } export const Attachment = { - id: Types.Long, // attachment id + id: String, // attachment id filename: String, // name of file attached size: Number, // size of file in bytes url: String, // source url of file @@ -150,7 +150,7 @@ export const EmbedImage = { const Reaction = { count: Number, emoji: { - id: Types.Long, + id: String, name: String, animated: Boolean, }, @@ -191,20 +191,20 @@ export const Embed = { }; export const MessageSchema = new Schema({ - id: Types.Long, - channel_id: Types.Long, - author_id: Types.Long, - webhook_id: Types.Long, - guild_id: Types.Long, - application_id: Types.Long, + id: String, + channel_id: String, + author_id: String, + webhook_id: String, + guild_id: String, + application_id: String, content: String, timestamp: Date, edited_timestamp: Date, tts: Boolean, mention_everyone: Boolean, - mention_user_ids: [Types.Long], - mention_role_ids: [Types.Long], - mention_channel_ids: [Types.Long], + mention_user_ids: [String], + mention_role_ids: [String], + mention_channel_ids: [String], attachments: [Attachment], embeds: [Embed], reactions: [Reaction], @@ -218,9 +218,9 @@ export const MessageSchema = new Schema({ flags: Types.Long, stickers: [], message_reference: { - message_id: Types.Long, - channel_id: Types.Long, - guild_id: Types.Long, + message_id: String, + channel_id: String, + guild_id: String, }, }); diff --git a/src/models/Role.ts b/src/models/Role.ts index fe716593..adb75b0a 100644 --- a/src/models/Role.ts +++ b/src/models/Role.ts @@ -2,8 +2,8 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Role { - id: bigint; - guild_id: bigint; + id: string; + guild_id: string; color: number; hoist: boolean; managed: boolean; @@ -12,17 +12,17 @@ export interface Role { permissions: bigint; position: number; tags?: { - bot_id?: bigint; + bot_id?: string; }; } export interface RoleDocument extends Document, Role { - id: bigint; + id: string; } export const RoleSchema = new Schema({ - id: Types.Long, - guild_id: Types.Long, + id: String, + guild_id: String, color: Number, hoist: Boolean, managed: Boolean, @@ -31,7 +31,7 @@ export const RoleSchema = new Schema({ permissions: Types.Long, position: Number, tags: { - bot_id: Types.Long, + bot_id: String, }, }); diff --git a/src/models/User.ts b/src/models/User.ts index 9f447d91..7173e9a3 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -4,7 +4,7 @@ import { Schema, Types, Document } from "mongoose"; import db from "../util/Database"; export interface User { - id: bigint; + id: string; username: string; // username max length 32, min 2 discriminator: string; // #0001 4 digit long string from #0001 - #9999 avatar: string | null; // hash of the user avatar @@ -24,7 +24,7 @@ export interface User { flags: bigint; // UserFlags public_flags: bigint; user_settings: UserSettings; - guilds: bigint[]; // array of guild ids the user is part of + guilds: string[]; // array of guild ids the user is part of user_data: UserData; presence: { status: Status; @@ -43,11 +43,11 @@ export interface UserData { } export interface UserDocument extends User, Document { - id: bigint; + id: string; } export interface PublicUser { - id: bigint; + id: string; discriminator: string; username: string; avatar?: string; @@ -67,10 +67,10 @@ export interface ConnectedAccount { } export interface Relationship { - id: bigint; + id: string; nickname?: string; type: number; - user_id: bigint; + user_id: string; } export interface UserSettings { @@ -81,7 +81,7 @@ export interface UserSettings { contact_sync_enabled: boolean; convert_emoticons: boolean; custom_status: { - emoji_id: bigint | null; + emoji_id: string | null; emoji_name: string | null; expires_at: number | null; text: string | null; @@ -98,11 +98,11 @@ export interface UserSettings { guild_folders: // every top guild is displayed as a "folder" { color: number; - guild_ids: bigint[]; + guild_ids: string[]; id: number; name: string; }[]; - guild_positions: bigint[]; // guild ids ordered by position + guild_positions: string[]; // guild ids ordered by position inline_attachment_media: boolean; inline_embed_media: boolean; locale: string; // en_US @@ -110,7 +110,7 @@ export interface UserSettings { native_phone_integration_enabled: boolean; render_embeds: boolean; render_reactions: boolean; - restricted_guilds: bigint[]; + restricted_guilds: string[]; show_current_game: boolean; status: "online" | "offline" | "dnd" | "idle"; stream_notifications_enabled: boolean; @@ -119,7 +119,7 @@ export interface UserSettings { } export const UserSchema = new Schema({ - id: Types.Long, + id: String, username: String, discriminator: String, avatar: String, @@ -138,17 +138,17 @@ export const UserSchema = new Schema({ email: String, flags: Types.Long, // TODO: automatically convert Types.Long to BitField of UserFlags public_flags: Types.Long, - guilds: [Types.Long], // array of guild ids the user is part of + guilds: [String], // array of guild ids the user is part of user_data: { fingerprints: [String], hash: String, // hash of the password, salt is saved in password (bcrypt) valid_tokens_since: Date, // all tokens with a previous issue date are invalid relationships: [ { - id: Types.Long, + id: String, nickname: String, type: Number, - user_id: Types.Long, + user_id: String, }, ], connected_accounts: [ @@ -173,7 +173,7 @@ export const UserSchema = new Schema({ contact_sync_enabled: Boolean, convert_emoticons: Boolean, custom_status: { - emoji_id: Types.Long, + emoji_id: String, emoji_name: String, expires_at: Number, text: String, @@ -191,12 +191,12 @@ export const UserSchema = new Schema({ guild_folders: [ { color: Number, - guild_ids: [Types.Long], + guild_ids: [String], id: Number, name: String, }, ], - guild_positions: [Types.Long], // guild ids ordered by position + guild_positions: [String], // guild ids ordered by position inline_attachment_media: Boolean, inline_embed_media: Boolean, locale: String, // en_US @@ -204,7 +204,7 @@ export const UserSchema = new Schema({ native_phone_integration_enabled: Boolean, render_embeds: Boolean, render_reactions: Boolean, - restricted_guilds: [Types.Long], + restricted_guilds: [String], show_current_game: Boolean, status: String, stream_notifications_enabled: Boolean, diff --git a/src/models/VoiceState.ts b/src/models/VoiceState.ts index 30439feb..c1f90edd 100644 --- a/src/models/VoiceState.ts +++ b/src/models/VoiceState.ts @@ -3,9 +3,9 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface VoiceState extends Document { - guild_id?: bigint; - channel_id: bigint; - user_id: bigint; + guild_id?: string; + channel_id: string; + user_id: string; session_id: string; deaf: boolean; mute: boolean; @@ -17,9 +17,9 @@ export interface VoiceState extends Document { } export const VoiceSateSchema = new Schema({ - guild_id: Types.Long, - channel_id: Types.Long, - user_id: Types.Long, + guild_id: String, + channel_id: String, + user_id: String, session_id: String, deaf: Boolean, mute: Boolean, diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts index 809111bf..4bad70d3 100644 --- a/src/util/Permissions.ts +++ b/src/util/Permissions.ts @@ -121,7 +121,7 @@ export class Permissions extends BitField { guild, channel, }: { - user: { id: bigint; roles: bigint[] }; + user: { id: string; roles: string[] }; guild: { roles: Role[] }; channel?: { overwrites?: ChannelPermissionOverwrite[]; @@ -144,9 +144,9 @@ export class Permissions extends BitField { } export async function getPermission( - user_id: bigint, - guild_id: bigint, - channel_id?: bigint, + user_id: string, + guild_id: string, + channel_id?: string, cache?: { channel?: ChannelDocument | null; member?: MemberDocument | null } ) { var { channel, member } = cache || {}; diff --git a/src/util/Snowflake.ts b/src/util/Snowflake.ts index 9e94bbd9..1ccae43c 100644 --- a/src/util/Snowflake.ts +++ b/src/util/Snowflake.ts @@ -87,7 +87,7 @@ export class Snowflake { var worker = Snowflake.workerId << 17n; var process = Snowflake.processId << 12n; var increment = Snowflake.INCREMENT++; - return time | worker | process | increment; + return (time | worker | process | increment).toString(); } /** |