mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 13:14:06 +01:00
✨ Event Enum
This commit is contained in:
parent
9d06aa09bf
commit
4d6fd4634f
42
dist/models/Event.d.ts
vendored
42
dist/models/Event.d.ts
vendored
@ -353,5 +353,47 @@ export interface InteractionCreateEvent extends Event {
|
|||||||
event: "INTERACTION_CREATE";
|
event: "INTERACTION_CREATE";
|
||||||
data: Interaction;
|
data: Interaction;
|
||||||
}
|
}
|
||||||
|
export declare enum EVENTEnum {
|
||||||
|
Ready = "READY",
|
||||||
|
ChannelCreate = "CHANNEL_CREATE",
|
||||||
|
ChannelUpdate = "CHANNEL_UPDATE",
|
||||||
|
ChannelDelete = "CHANNEL_DELETE",
|
||||||
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
||||||
|
GuildCreate = "GUILD_CREATE",
|
||||||
|
GuildUpdate = "GUILD_UPDATE",
|
||||||
|
GuildDelete = "GUILD_DELETE",
|
||||||
|
GuildBanAdd = "GUILD_BAN_ADD",
|
||||||
|
GuildBanRemove = "GUILD_BAN_REMOVE",
|
||||||
|
GuildEmojUpdate = "GUILD_EMOJI_UPDATE",
|
||||||
|
GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
|
||||||
|
GuildMemberAdd = "GUILD_MEMBER_ADD",
|
||||||
|
GuildMemberRempve = "GUILD_MEMBER_REMOVE",
|
||||||
|
GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
|
||||||
|
GuildMemberSpeaking = "GUILD_MEMBER_SPEAKING",
|
||||||
|
GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
|
||||||
|
GuildRoleCreate = "GUILD_ROLE_CREATE",
|
||||||
|
GuildRoleDelete = "GUILD_ROLE_DELETE",
|
||||||
|
GuildRoleUpdate = "GUILD_ROLE_UPDATE",
|
||||||
|
InviteCreate = "INVITE_CREATE",
|
||||||
|
InviteDelete = "INVITE_DELETE",
|
||||||
|
MessageCreate = "MESSAGE_CREATE",
|
||||||
|
MessageUpdate = "MESSAGE_UPDATE",
|
||||||
|
MessageDelete = "MESSAGE_DELETE",
|
||||||
|
MessageDeleteBulk = "MESSAGE_DELETE_BULK",
|
||||||
|
MessageReactionAdd = "MESSAGE_REACTION_ADD",
|
||||||
|
MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
|
||||||
|
MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
|
||||||
|
MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
|
||||||
|
PresenceUpdate = "PRESENCE_UPDATE",
|
||||||
|
TypingStart = "TYPING_START",
|
||||||
|
UserUpdate = "USER_UPDATE",
|
||||||
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
||||||
|
InteractionCreate = "INTERACTION_CREATE",
|
||||||
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
||||||
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
||||||
|
ApplicationCommandCreate = "APPLICATION_COMMAND_CREATE",
|
||||||
|
ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE",
|
||||||
|
ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE"
|
||||||
|
}
|
||||||
export declare type EVENT = "READY" | "CHANNEL_CREATE" | "CHANNEL_UPDATE" | "CHANNEL_DELETE" | "CHANNEL_PINS_UPDATE" | "GUILD_CREATE" | "GUILD_UPDATE" | "GUILD_DELETE" | "GUILD_BAN_ADD" | "GUILD_BAN_REMOVE" | "GUILD_EMOJI_UPDATE" | "GUILD_INTEGRATIONS_UPDATE" | "GUILD_MEMBER_ADD" | "GUILD_MEMBER_REMOVE" | "GUILD_MEMBER_UPDATE" | "GUILD_MEMBER_SPEAKING" | "GUILD_MEMBERS_CHUNK" | "GUILD_ROLE_CREATE" | "GUILD_ROLE_DELETE" | "GUILD_ROLE_UPDATE" | "INVITE_CREATE" | "INVITE_DELETE" | "MESSAGE_CREATE" | "MESSAGE_UPDATE" | "MESSAGE_DELETE" | "MESSAGE_DELETE_BULK" | "MESSAGE_REACTION_ADD" | "MESSAGE_REACTION_REMOVE" | "MESSAGE_REACTION_REMOVE_ALL" | "MESSAGE_REACTION_REMOVE_EMOJI" | "PRESENCE_UPDATE" | "TYPING_START" | "USER_UPDATE" | "WEBHOOKS_UPDATE" | "INTERACTION_CREATE" | "VOICE_STATE_UPDATE" | "VOICE_SERVER_UPDATE" | "APPLICATION_COMMAND_CREATE" | "APPLICATION_COMMAND_UPDATE" | "APPLICATION_COMMAND_DELETE" | CUSTOMEVENTS;
|
export declare type EVENT = "READY" | "CHANNEL_CREATE" | "CHANNEL_UPDATE" | "CHANNEL_DELETE" | "CHANNEL_PINS_UPDATE" | "GUILD_CREATE" | "GUILD_UPDATE" | "GUILD_DELETE" | "GUILD_BAN_ADD" | "GUILD_BAN_REMOVE" | "GUILD_EMOJI_UPDATE" | "GUILD_INTEGRATIONS_UPDATE" | "GUILD_MEMBER_ADD" | "GUILD_MEMBER_REMOVE" | "GUILD_MEMBER_UPDATE" | "GUILD_MEMBER_SPEAKING" | "GUILD_MEMBERS_CHUNK" | "GUILD_ROLE_CREATE" | "GUILD_ROLE_DELETE" | "GUILD_ROLE_UPDATE" | "INVITE_CREATE" | "INVITE_DELETE" | "MESSAGE_CREATE" | "MESSAGE_UPDATE" | "MESSAGE_DELETE" | "MESSAGE_DELETE_BULK" | "MESSAGE_REACTION_ADD" | "MESSAGE_REACTION_REMOVE" | "MESSAGE_REACTION_REMOVE_ALL" | "MESSAGE_REACTION_REMOVE_EMOJI" | "PRESENCE_UPDATE" | "TYPING_START" | "USER_UPDATE" | "WEBHOOKS_UPDATE" | "INTERACTION_CREATE" | "VOICE_STATE_UPDATE" | "VOICE_SERVER_UPDATE" | "APPLICATION_COMMAND_CREATE" | "APPLICATION_COMMAND_UPDATE" | "APPLICATION_COMMAND_DELETE" | CUSTOMEVENTS;
|
||||||
export declare type CUSTOMEVENTS = "INVALIDATED";
|
export declare type CUSTOMEVENTS = "INVALIDATED";
|
||||||
|
46
dist/models/Event.js
vendored
46
dist/models/Event.js
vendored
@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.EventModel = exports.EventSchema = void 0;
|
exports.EVENTEnum = exports.EventModel = exports.EventSchema = void 0;
|
||||||
const mongoose_1 = require("mongoose");
|
const mongoose_1 = require("mongoose");
|
||||||
const Database_1 = __importDefault(require("../util/Database"));
|
const Database_1 = __importDefault(require("../util/Database"));
|
||||||
exports.EventSchema = new mongoose_1.Schema({
|
exports.EventSchema = new mongoose_1.Schema({
|
||||||
@ -16,4 +16,48 @@ exports.EventSchema = new mongoose_1.Schema({
|
|||||||
});
|
});
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
exports.EventModel = Database_1.default.model("Event", exports.EventSchema, "events");
|
exports.EventModel = Database_1.default.model("Event", exports.EventSchema, "events");
|
||||||
|
// located in collection events
|
||||||
|
var EVENTEnum;
|
||||||
|
(function (EVENTEnum) {
|
||||||
|
EVENTEnum["Ready"] = "READY";
|
||||||
|
EVENTEnum["ChannelCreate"] = "CHANNEL_CREATE";
|
||||||
|
EVENTEnum["ChannelUpdate"] = "CHANNEL_UPDATE";
|
||||||
|
EVENTEnum["ChannelDelete"] = "CHANNEL_DELETE";
|
||||||
|
EVENTEnum["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
|
||||||
|
EVENTEnum["GuildCreate"] = "GUILD_CREATE";
|
||||||
|
EVENTEnum["GuildUpdate"] = "GUILD_UPDATE";
|
||||||
|
EVENTEnum["GuildDelete"] = "GUILD_DELETE";
|
||||||
|
EVENTEnum["GuildBanAdd"] = "GUILD_BAN_ADD";
|
||||||
|
EVENTEnum["GuildBanRemove"] = "GUILD_BAN_REMOVE";
|
||||||
|
EVENTEnum["GuildEmojUpdate"] = "GUILD_EMOJI_UPDATE";
|
||||||
|
EVENTEnum["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE";
|
||||||
|
EVENTEnum["GuildMemberAdd"] = "GUILD_MEMBER_ADD";
|
||||||
|
EVENTEnum["GuildMemberRempve"] = "GUILD_MEMBER_REMOVE";
|
||||||
|
EVENTEnum["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE";
|
||||||
|
EVENTEnum["GuildMemberSpeaking"] = "GUILD_MEMBER_SPEAKING";
|
||||||
|
EVENTEnum["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK";
|
||||||
|
EVENTEnum["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
|
||||||
|
EVENTEnum["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
|
||||||
|
EVENTEnum["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
|
||||||
|
EVENTEnum["InviteCreate"] = "INVITE_CREATE";
|
||||||
|
EVENTEnum["InviteDelete"] = "INVITE_DELETE";
|
||||||
|
EVENTEnum["MessageCreate"] = "MESSAGE_CREATE";
|
||||||
|
EVENTEnum["MessageUpdate"] = "MESSAGE_UPDATE";
|
||||||
|
EVENTEnum["MessageDelete"] = "MESSAGE_DELETE";
|
||||||
|
EVENTEnum["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
|
||||||
|
EVENTEnum["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
|
||||||
|
EVENTEnum["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
|
||||||
|
EVENTEnum["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
|
||||||
|
EVENTEnum["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
|
||||||
|
EVENTEnum["PresenceUpdate"] = "PRESENCE_UPDATE";
|
||||||
|
EVENTEnum["TypingStart"] = "TYPING_START";
|
||||||
|
EVENTEnum["UserUpdate"] = "USER_UPDATE";
|
||||||
|
EVENTEnum["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
|
||||||
|
EVENTEnum["InteractionCreate"] = "INTERACTION_CREATE";
|
||||||
|
EVENTEnum["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
|
||||||
|
EVENTEnum["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
|
||||||
|
EVENTEnum["ApplicationCommandCreate"] = "APPLICATION_COMMAND_CREATE";
|
||||||
|
EVENTEnum["ApplicationCommandUpdate"] = "APPLICATION_COMMAND_UPDATE";
|
||||||
|
EVENTEnum["ApplicationCommandDelete"] = "APPLICATION_COMMAND_DELETE";
|
||||||
|
})(EVENTEnum = exports.EVENTEnum || (exports.EVENTEnum = {}));
|
||||||
//# sourceMappingURL=Event.js.map
|
//# 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;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,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"}
|
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../src/models/Event.ts"],"names":[],"mappings":";;;;;;AAYA,uCAA0D;AAC1D,gEAAk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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"}
|
@ -404,6 +404,49 @@ export interface InteractionCreateEvent extends Event {
|
|||||||
|
|
||||||
// located in collection events
|
// located in collection events
|
||||||
|
|
||||||
|
export enum EVENTEnum {
|
||||||
|
Ready = "READY",
|
||||||
|
ChannelCreate = "CHANNEL_CREATE",
|
||||||
|
ChannelUpdate = "CHANNEL_UPDATE",
|
||||||
|
ChannelDelete = "CHANNEL_DELETE",
|
||||||
|
ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
|
||||||
|
GuildCreate = "GUILD_CREATE",
|
||||||
|
GuildUpdate = "GUILD_UPDATE",
|
||||||
|
GuildDelete = "GUILD_DELETE",
|
||||||
|
GuildBanAdd = "GUILD_BAN_ADD",
|
||||||
|
GuildBanRemove = "GUILD_BAN_REMOVE",
|
||||||
|
GuildEmojUpdate = "GUILD_EMOJI_UPDATE",
|
||||||
|
GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
|
||||||
|
GuildMemberAdd = "GUILD_MEMBER_ADD",
|
||||||
|
GuildMemberRempve = "GUILD_MEMBER_REMOVE",
|
||||||
|
GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
|
||||||
|
GuildMemberSpeaking = "GUILD_MEMBER_SPEAKING",
|
||||||
|
GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
|
||||||
|
GuildRoleCreate = "GUILD_ROLE_CREATE",
|
||||||
|
GuildRoleDelete = "GUILD_ROLE_DELETE",
|
||||||
|
GuildRoleUpdate = "GUILD_ROLE_UPDATE",
|
||||||
|
InviteCreate = "INVITE_CREATE",
|
||||||
|
InviteDelete = "INVITE_DELETE",
|
||||||
|
MessageCreate = "MESSAGE_CREATE",
|
||||||
|
MessageUpdate = "MESSAGE_UPDATE",
|
||||||
|
MessageDelete = "MESSAGE_DELETE",
|
||||||
|
MessageDeleteBulk = "MESSAGE_DELETE_BULK",
|
||||||
|
MessageReactionAdd = "MESSAGE_REACTION_ADD",
|
||||||
|
MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
|
||||||
|
MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
|
||||||
|
MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
|
||||||
|
PresenceUpdate = "PRESENCE_UPDATE",
|
||||||
|
TypingStart = "TYPING_START",
|
||||||
|
UserUpdate = "USER_UPDATE",
|
||||||
|
WebhooksUpdate = "WEBHOOKS_UPDATE",
|
||||||
|
InteractionCreate = "INTERACTION_CREATE",
|
||||||
|
VoiceStateUpdate = "VOICE_STATE_UPDATE",
|
||||||
|
VoiceServerUpdate = "VOICE_SERVER_UPDATE",
|
||||||
|
ApplicationCommandCreate = "APPLICATION_COMMAND_CREATE",
|
||||||
|
ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE",
|
||||||
|
ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE",
|
||||||
|
}
|
||||||
|
|
||||||
export type EVENT =
|
export type EVENT =
|
||||||
| "READY"
|
| "READY"
|
||||||
| "CHANNEL_CREATE"
|
| "CHANNEL_CREATE"
|
||||||
|
Loading…
Reference in New Issue
Block a user