mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
🐛 fix database
This commit is contained in:
parent
7e25f67878
commit
57746da872
7
dist/models/Channel.js
vendored
7
dist/models/Channel.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ChannelType = exports.ChannelPermissionOverwriteType = exports.ChannelModel = exports.ChannelSchema = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const Database_1 = __importDefault(require("../util/Database"));
|
||||
exports.ChannelSchema = new mongoose_1.Schema({
|
||||
id: mongoose_1.Types.Long,
|
||||
created_at: { type: mongoose_1.Schema.Types.Date, required: true },
|
||||
@ -26,7 +30,8 @@ exports.ChannelSchema = new mongoose_1.Schema({
|
||||
},
|
||||
],
|
||||
});
|
||||
exports.ChannelModel = mongoose_1.model("Channel", exports.ChannelSchema, "channels");
|
||||
// @ts-ignore
|
||||
exports.ChannelModel = Database_1.default.model("Channel", exports.ChannelSchema, "channels");
|
||||
var ChannelPermissionOverwriteType;
|
||||
(function (ChannelPermissionOverwriteType) {
|
||||
ChannelPermissionOverwriteType[ChannelPermissionOverwriteType["role"] = 0] = "role";
|
||||
|
2
dist/models/Channel.js.map
vendored
2
dist/models/Channel.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Channel.js","sourceRoot":"","sources":["../../src/models/Channel.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAQ7C,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,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"}
|
7
dist/models/Emoji.js
vendored
7
dist/models/Emoji.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
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: mongoose_1.Types.Long,
|
||||
animated: Boolean,
|
||||
@ -13,5 +17,6 @@ exports.EmojiSchema = new mongoose_1.Schema({
|
||||
url: String,
|
||||
roles: [mongoose_1.Types.Long],
|
||||
});
|
||||
exports.EmojiModel = mongoose_1.model("Emoji", exports.EmojiSchema, "emojis");
|
||||
// @ts-ignore
|
||||
exports.EmojiModel = Database_1.default.model("Emoji", exports.EmojiSchema, "emojis");
|
||||
//# sourceMappingURL=Emoji.js.map
|
2
dist/models/Emoji.js.map
vendored
2
dist/models/Emoji.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Emoji.js","sourceRoot":"","sources":["../../src/models/Emoji.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAc7C,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,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;AAEU,QAAA,UAAU,GAAG,gBAAK,CAAQ,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"}
|
||||
{"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,gBAAK,CAAC,IAAI;IACd,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"}
|
7
dist/models/Event.js
vendored
7
dist/models/Event.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
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,
|
||||
@ -10,5 +14,6 @@ exports.EventSchema = new mongoose_1.Schema({
|
||||
event: { type: String, required: true },
|
||||
data: Object,
|
||||
});
|
||||
exports.EventModel = mongoose_1.model("Event", exports.EventSchema, "events");
|
||||
// @ts-ignore
|
||||
exports.EventModel = Database_1.default.model("Event", exports.EventSchema, "events");
|
||||
//# sourceMappingURL=Event.js.map
|
2
dist/models/Event.js.map
vendored
2
dist/models/Event.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../src/models/Event.ts"],"names":[],"mappings":";;;AAYA,uCAA0D;AAa7C,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,QAAQ,EAAE,gBAAK,CAAC,IAAI;IACpB,OAAO,EAAE,gBAAK,CAAC,IAAI;IACnB,UAAU,EAAE,gBAAK,CAAC,IAAI;IACtB,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvC,IAAI,EAAE,MAAM;CACZ,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,gBAAK,CAAgB,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"}
|
||||
{"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,gBAAK,CAAC,IAAI;IACpB,OAAO,EAAE,gBAAK,CAAC,IAAI;IACnB,UAAU,EAAE,gBAAK,CAAC,IAAI;IACtB,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5C,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"}
|
7
dist/models/Guild.js
vendored
7
dist/models/Guild.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GuildModel = exports.GuildSchema = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const Database_1 = __importDefault(require("../util/Database"));
|
||||
exports.GuildSchema = new mongoose_1.Schema({
|
||||
afk_channel_id: mongoose_1.Types.Long,
|
||||
afk_timeout: Number,
|
||||
@ -40,5 +44,6 @@ exports.GuildSchema = new mongoose_1.Schema({
|
||||
widget_channel_id: mongoose_1.Types.Long,
|
||||
widget_enabled: Boolean,
|
||||
});
|
||||
exports.GuildModel = mongoose_1.model("Guild", exports.GuildSchema, "guilds");
|
||||
// @ts-ignore
|
||||
exports.GuildModel = Database_1.default.model("Guild", exports.GuildSchema, "guilds");
|
||||
//# sourceMappingURL=Guild.js.map
|
2
dist/models/Guild.js.map
vendored
2
dist/models/Guild.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Guild.js","sourceRoot":"","sources":["../../src/models/Guild.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAiD7C,QAAA,WAAW,GAAG,IAAI,iBAAM,CAAC;IACrC,cAAc,EAAE,gBAAK,CAAC,IAAI;IAC1B,WAAW,EAAE,MAAM;IACnB,cAAc,EAAE,gBAAK,CAAC,IAAI;IAC1B,MAAM,EAAE,MAAM;IACd,6BAA6B,EAAE,MAAM;IACrC,WAAW,EAAE,MAAM;IACnB,gBAAgB,EAAE,MAAM;IACxB,uBAAuB,EAAE,MAAM;IAC/B,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IACzC,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,EAAE,IAAI,EAAE,gBAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;IAC9C,aAAa,EAAE,MAAM;IACrB,uBAAuB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,E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iBAAiB,EAAE,gBAAK,CAAC,IAAI;IAC7B,cAAc,EAAE,OAAO;CACvB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,UAAU,GAAG,kBAAE,CAAC,KAAK,CAAgB,OAAO,EAAE,mBAAW,EAAE,QAAQ,CAAC,CAAC"}
|
7
dist/models/Invite.js
vendored
7
dist/models/Invite.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.InviteModel = exports.InviteSchema = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const Database_1 = __importDefault(require("../util/Database"));
|
||||
exports.InviteSchema = new mongoose_1.Schema({
|
||||
code: String,
|
||||
temporary: Boolean,
|
||||
@ -37,5 +41,6 @@ exports.InviteSchema = new mongoose_1.Schema({
|
||||
},
|
||||
target_user_type: Number,
|
||||
});
|
||||
exports.InviteModel = mongoose_1.model("Invite", exports.InviteSchema, "invites");
|
||||
// @ts-ignore
|
||||
exports.InviteModel = Database_1.default.model("Invite", exports.InviteSchema, "invites");
|
||||
//# sourceMappingURL=Invite.js.map
|
2
dist/models/Invite.js.map
vendored
2
dist/models/Invite.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Invite.js","sourceRoot":"","sources":["../../src/models/Invite.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAsC7C,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,MAAM;IAClB,KAAK,EAAE;QACN,EAAE,EAAE,gBAAK,CAAC,IAAI;QACd,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,MAAM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AC,IAAI;QACd,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,MAAM;QACd,aAAa,EAAE,MAAM;KACrB;IACD,WAAW,EAAE;QACZ,EAAE,EAAE,gBAAK,CAAC,IAAI;QACd,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,MAAM;QACd,aAAa,EAAE,MAAM;KACrB;IACD,gBAAgB,EAAE,MAAM;CACxB,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAS,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
|
7
dist/models/Member.js
vendored
7
dist/models/Member.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MemberModel = exports.MemberSchema = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const Database_1 = __importDefault(require("../util/Database"));
|
||||
const MuteConfig = {
|
||||
end_time: Number,
|
||||
selected_time_window: Number,
|
||||
@ -35,5 +39,6 @@ exports.MemberSchema = new mongoose_1.Schema({
|
||||
version: Number,
|
||||
},
|
||||
});
|
||||
exports.MemberModel = mongoose_1.model("Member", exports.MemberSchema, "members");
|
||||
// @ts-ignore
|
||||
exports.MemberModel = Database_1.default.model("Member", exports.MemberSchema, "members");
|
||||
//# sourceMappingURL=Member.js.map
|
2
dist/models/Member.js.map
vendored
2
dist/models/Member.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Member.js","sourceRoot":"","sources":["../../src/models/Member.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAyC1D,MAAM,UAAU,GAAG;IAClB,QAAQ,EAAE,MAAM;IAChB,oBAAoB,EAAE,MAAM;CAC5B,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAC;IACtC,EAAE,EAAE,gBAAK,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IAChB,WAAW,EAAE,gBAAK,CAAC,IAAI;IACvB,QAAQ,EAAE;QACT,iBAAiB,EAAE;YAClB;gBACC,UAAU,EAAE,gBAAK,CAAC,IAAI;gBACtB,qBAAqB,EAAE,MAAM;gBAC7B,WAAW,EAAE,UAAU;gBACvB,KAAK,EAAE,OAAO;aACd;SACD;QACD,qBAAqB,EAAE,MAAM;QAC7B,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,UAAU;QACvB,KAAK,EAAE,OAAO;QACd,iBAAiB,EAAE,OAAO;QAC1B,cAAc,EAAE,OAAO;QACvB,OAAO,EAAE,MAAM;KACf;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,WAAW,GAAG,kBAAE,CAAC,KAAK,CAAiB,QAAQ,EAAE,oBAAY,EAAE,SAAS,CAAC,CAAC"}
|
7
dist/models/Message.js
vendored
7
dist/models/Message.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MessageModel = exports.MessageSchema = exports.MessageType = void 0;
|
||||
const mongoose_1 = require("mongoose");
|
||||
const Database_1 = __importDefault(require("../util/Database"));
|
||||
var MessageType;
|
||||
(function (MessageType) {
|
||||
MessageType[MessageType["DEFAULT"] = 0] = "DEFAULT";
|
||||
@ -117,5 +121,6 @@ exports.MessageSchema = new mongoose_1.Schema({
|
||||
guild_id: mongoose_1.Types.Long,
|
||||
},
|
||||
});
|
||||
exports.MessageModel = mongoose_1.model("Message", exports.MessageSchema, "messages");
|
||||
// @ts-ignore
|
||||
exports.MessageModel = Database_1.default.model("Message", exports.MessageSchema, "messages");
|
||||
//# sourceMappingURL=Message.js.map
|
2
dist/models/Message.js.map
vendored
2
dist/models/Message.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message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E,CAAC,gBAAK,CAAC,IAAI,CAAC;IACtB,aAAa,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IAC3B,gBAAgB,EAAE;QACjB;YACC,EAAE,EAAE,gBAAK,CAAC,IAAI;YACd,QAAQ,EAAE,gBAAK,CAAC,IAAI;YACpB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACtB,IAAI,EAAE,MAAM;SACZ;KACD;IACD,WAAW,EAAE,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,CAAC,KAAK,CAAC;IACf,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,KAAK,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;IACzB,MAAM,EAAE,OAAO;IACf,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACtB,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,MAAM;KAChB;IACD,KAAK,EAAE,gBAAK,CAAC,IAAI;IACjB,QAAQ,EAAE,EAAE;IACZ,iBAAiB,EAAE;QAClB,UAAU,EAAE,gBAAK,CAAC,IAAI;QACtB,UAAU,EAAE,gBAAK,CAAC,IAAI;QACtB,QAAQ,EAAE,gBAAK,CAAC,IAAI;KACpB;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,YAAY,GAAG,kBAAE,CAAC,KAAK,CAAU,SAAS,EAAE,qBAAa,EAAE,UAAU,CAAC,CAAC"}
|
7
dist/models/Role.js
vendored
7
dist/models/Role.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
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,
|
||||
@ -16,5 +20,6 @@ exports.RoleSchema = new mongoose_1.Schema({
|
||||
bot_id: mongoose_1.Types.Long,
|
||||
},
|
||||
});
|
||||
exports.RoleModel = mongoose_1.model("Role", exports.RoleSchema, "roles");
|
||||
// @ts-ignore
|
||||
exports.RoleModel = Database_1.default.model("Role", exports.RoleSchema, "roles");
|
||||
//# sourceMappingURL=Role.js.map
|
2
dist/models/Role.js.map
vendored
2
dist/models/Role.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Role.js","sourceRoot":"","sources":["../../src/models/Role.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAqB7C,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;AAEU,QAAA,SAAS,GAAG,gBAAK,CAAe,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"}
|
||||
{"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"}
|
7
dist/models/User.js
vendored
7
dist/models/User.js
vendored
@ -1,9 +1,13 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.UserModel = exports.UserSchema = void 0;
|
||||
const Activity_1 = require("./Activity");
|
||||
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,
|
||||
username: String,
|
||||
@ -99,5 +103,6 @@ exports.UserSchema = new mongoose_1.Schema({
|
||||
client_status: Status_1.ClientStatus,
|
||||
},
|
||||
});
|
||||
exports.UserModel = mongoose_1.model("User", exports.UserSchema, "users");
|
||||
// @ts-ignore
|
||||
exports.UserModel = Database_1.default.model("User", exports.UserSchema, "users");
|
||||
//# sourceMappingURL=User.js.map
|
2
dist/models/User.js.map
vendored
2
dist/models/User.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,qCAAgD;AAChD,uCAA0D;AA0G7C,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAC;IACpC,EAAE,EAAE,gBAAK,CAAC,IAAI;IACd,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,CAAC,MAAM,CAAC;IACtB,KAAK,EA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,CAAC,gBAAK,CAAC,IAAI,CAAC;QAC7B,uBAAuB,EAAE,OAAO;QAChC,kBAAkB,EAAE,OAAO;QAC3B,MAAM,EAAE,MAAM;QACd,uBAAuB,EAAE,OAAO;QAChC,gCAAgC,EAAE,OAAO;QACzC,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,OAAO;QACzB,iBAAiB,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;QAC/B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE,MAAM;QACd,4BAA4B,EAAE,OAAO;QACrC,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,MAAM;KACvB;IACD,aAAa,EAAE;QACd;YACC,EAAE,EAAE,gBAAK,CAAC,IAAI;YACd,QAAQ,EAAE,MAAM;YAChB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,gBAAK,CAAC,IAAI;SACnB;KACD;IACD,kBAAkB,EAAE;QACnB;YACC,YAAY,EAAE,MAAM;YACpB,WAAW,EAAE,OAAO;YACpB,EAAE,EAAE,MAAM;YACV,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;YAChB,aAAa,EAAE,OAAO;YACtB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,MAAM;SAClB;KACD;IACD,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,CAAC,mBAAQ,CAAC;QACtB,aAAa,EAAE,qBAAY;KAC3B;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,SAAS,GAAG,kBAAE,CAAC,KAAK,CAAO,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"}
|
7
dist/models/VoiceState.js
vendored
7
dist/models/VoiceState.js
vendored
@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
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,
|
||||
@ -15,5 +19,6 @@ exports.VoiceSateSchema = new mongoose_1.Schema({
|
||||
self_video: Boolean,
|
||||
suppress: Boolean,
|
||||
});
|
||||
exports.VoiceStateModel = mongoose_1.model("VoiceState", exports.VoiceSateSchema, "voicestates");
|
||||
// @ts-ignore
|
||||
exports.VoiceStateModel = Database_1.default.model("VoiceState", exports.VoiceSateSchema, "voicestates");
|
||||
//# sourceMappingURL=VoiceState.js.map
|
2
dist/models/VoiceState.js.map
vendored
2
dist/models/VoiceState.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"VoiceState.js","sourceRoot":"","sources":["../../src/models/VoiceState.ts"],"names":[],"mappings":";;;AACA,uCAA0D;AAgB7C,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;AAEU,QAAA,eAAe,GAAG,gBAAK,CAAa,YAAY,EAAE,uBAAe,EAAE,aAAa,CAAC,CAAC"}
|
||||
{"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"}
|
4
dist/util/Database.js
vendored
4
dist/util/Database.js
vendored
@ -8,7 +8,9 @@ require("./MongoBigInt");
|
||||
const mongoose_1 = __importDefault(require("mongoose"));
|
||||
const mongodb_1 = require("mongodb");
|
||||
const events_1 = __importDefault(require("events"));
|
||||
exports.default = mongoose_1.default.connection;
|
||||
const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPreference=secondaryPreferred";
|
||||
const connection = mongoose_1.default.createConnection(uri, { autoIndex: true });
|
||||
exports.default = connection;
|
||||
class MongooseCache extends events_1.default {
|
||||
constructor(collection, pipeline, opts) {
|
||||
super();
|
||||
|
2
dist/util/Database.js.map
vendored
2
dist/util/Database.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../src/util/Database.ts"],"names":[],"mappings":";;;;;;AAAA,yBAAuB;AACvB,wDAAgD;AAChD,qCAA0D;AAC1D,oDAAkC;AAElC,kBAAe,kBAAQ,CAAC,UAAU,CAAC;AASnC,MAAa,aAAc,SAAQ,gBAAY;IAI9C,YACQ,UAAsB,EACtB,QAAwC,EACxC,IAEN;QAED,KAAK,EAAE,CAAC;QAND,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAgC;QACxC,SAAI,GAAJ,IA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,OAAO,CAAC,CAAC;QAEnB,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YAAE,OAAO;QAEnC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;CACD;AAxED,sCAwEC"}
|
@ -1,4 +1,5 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface AnyChannel extends Channel, DMChannel, TextChannel, VoiceChannel {}
|
||||
|
||||
@ -31,7 +32,8 @@ export const ChannelSchema = new Schema({
|
||||
],
|
||||
});
|
||||
|
||||
export const ChannelModel = model<ChannelDocument>("Channel", ChannelSchema, "channels");
|
||||
// @ts-ignore
|
||||
export const ChannelModel = db.model<ChannelDocument>("Channel", ChannelSchema, "channels");
|
||||
|
||||
export interface Channel {
|
||||
id: bigint;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Emoji extends Document {
|
||||
id: bigint;
|
||||
@ -24,4 +25,5 @@ export const EmojiSchema = new Schema({
|
||||
roles: [Types.Long],
|
||||
});
|
||||
|
||||
export const EmojiModel = model<Emoji>("Emoji", EmojiSchema, "emojis");
|
||||
// @ts-ignore
|
||||
export const EmojiModel = db.model<Emoji>("Emoji", EmojiSchema, "emojis");
|
||||
|
@ -11,6 +11,7 @@ import { VoiceState } from "./VoiceState";
|
||||
import { ApplicationCommand } from "./Application";
|
||||
import { Interaction } from "./Interaction";
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Event {
|
||||
guild_id?: bigint;
|
||||
@ -32,7 +33,8 @@ export const EventSchema = new Schema({
|
||||
data: Object,
|
||||
});
|
||||
|
||||
export const EventModel = model<EventDocument>("Event", EventSchema, "events");
|
||||
// @ts-ignore
|
||||
export const EventModel = db.model<EventDocument>("Event", EventSchema, "events");
|
||||
|
||||
// ! Custom Events that shouldn't get sent to the client but processed by the server
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface GuildDocument extends Document, Guild {
|
||||
id: bigint;
|
||||
@ -86,4 +87,5 @@ export const GuildSchema = new Schema({
|
||||
widget_enabled: Boolean,
|
||||
});
|
||||
|
||||
export const GuildModel = model<GuildDocument>("Guild", GuildSchema, "guilds");
|
||||
// @ts-ignore
|
||||
export const GuildModel = db.model<GuildDocument>("Guild", GuildSchema, "guilds");
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Invite extends Document {
|
||||
code: string;
|
||||
@ -73,4 +74,5 @@ export const InviteSchema = new Schema({
|
||||
target_user_type: Number,
|
||||
});
|
||||
|
||||
export const InviteModel = model<Invite>("Invite", InviteSchema, "invites");
|
||||
// @ts-ignore
|
||||
export const InviteModel = db.model<Invite>("Invite", InviteSchema, "invites");
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { PublicUser } from "./User";
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Member {
|
||||
id: bigint;
|
||||
@ -75,7 +76,8 @@ export const MemberSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
export const MemberModel = model<MemberDocument>("Member", MemberSchema, "members");
|
||||
// @ts-ignore
|
||||
export const MemberModel = db.model<MemberDocument>("Member", MemberSchema, "members");
|
||||
|
||||
export interface PublicMember extends Omit<Member, "settings" | "id"> {
|
||||
user: PublicUser;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import { ChannelType } from "./Channel";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Message extends Document {
|
||||
id: bigint;
|
||||
@ -227,4 +228,5 @@ export const MessageSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
export const MessageModel = model<Message>("Message", MessageSchema, "messages");
|
||||
// @ts-ignore
|
||||
export const MessageModel = db.model<Message>("Message", MessageSchema, "messages");
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface Role {
|
||||
id: bigint;
|
||||
@ -34,4 +35,5 @@ export const RoleSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
export const RoleModel = model<RoleDocument>("Role", RoleSchema, "roles");
|
||||
// @ts-ignore
|
||||
export const RoleModel = db.model<RoleDocument>("Role", RoleSchema, "roles");
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { Activity } from "./Activity";
|
||||
import { ClientStatus, Status } from "./Status";
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface User extends Document {
|
||||
id: bigint;
|
||||
@ -202,4 +203,5 @@ export const UserSchema = new Schema({
|
||||
},
|
||||
});
|
||||
|
||||
export const UserModel = model<User>("User", UserSchema, "users");
|
||||
// @ts-ignore
|
||||
export const UserModel = db.model<User>("User", UserSchema, "users");
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { PublicMember } from "./Member";
|
||||
import { Schema, model, Types, Document } from "mongoose";
|
||||
import db from "../util/Database";
|
||||
|
||||
export interface VoiceState extends Document {
|
||||
guild_id?: bigint;
|
||||
@ -29,4 +30,5 @@ export const VoiceSateSchema = new Schema({
|
||||
suppress: Boolean, // whether this user is muted by the current user
|
||||
});
|
||||
|
||||
export const VoiceStateModel = model<VoiceState>("VoiceState", VoiceSateSchema, "voicestates");
|
||||
// @ts-ignore
|
||||
export const VoiceStateModel = db.model<VoiceState>("VoiceState", VoiceSateSchema, "voicestates");
|
||||
|
@ -1,9 +1,12 @@
|
||||
import "./MongoBigInt";
|
||||
import mongoose, { Collection } from "mongoose";
|
||||
import mongoose, { Collection, Connection } from "mongoose";
|
||||
import { ChangeStream, ChangeEvent, Long } from "mongodb";
|
||||
import EventEmitter from "events";
|
||||
const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPreference=secondaryPreferred";
|
||||
|
||||
export default mongoose.connection;
|
||||
const connection = mongoose.createConnection(uri, { autoIndex: true });
|
||||
|
||||
export default <Connection>connection;
|
||||
|
||||
export interface MongooseCache {
|
||||
on(event: "delete", listener: (id: string) => void): this;
|
||||
|
Loading…
Reference in New Issue
Block a user