diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-16 15:07:18 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-16 15:07:18 +0200 |
commit | e77678799e4ade391b2a9ef3fafc14f33894016a (patch) | |
tree | a416cc6824762ed217ec872aa084e100ebaef9d9 | |
parent | :sparkles: update auth middleware (diff) | |
download | server-e77678799e4ade391b2a9ef3fafc14f33894016a.tar.xz |
update Event
-rw-r--r-- | bundle/src/Server.ts | 2 | ||||
-rw-r--r-- | util/src/models/Event.ts | 16 | ||||
-rw-r--r-- | util/src/util/Event.ts | 4 |
3 files changed, 3 insertions, 19 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts index 0ef7a8a3..faf8a324 100644 --- a/bundle/src/Server.ts +++ b/bundle/src/Server.ts @@ -10,7 +10,7 @@ import { Config } from "../../util/dist"; const app = express(); const server = http.createServer(); -const port = Number(process.env.PORT) || 8080; +const port = Number(process.env.PORT) || 3001; const production = false; server.on("request", app); diff --git a/util/src/models/Event.ts b/util/src/models/Event.ts index 1564107d..86d0fd00 100644 --- a/util/src/models/Event.ts +++ b/util/src/models/Event.ts @@ -10,8 +10,6 @@ import { Message, PartialEmoji } from "./Message"; 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?: string; @@ -22,20 +20,6 @@ export interface Event { data?: any; } -export interface EventDocument extends Event, Document {} - -export const EventSchema = new Schema({ - guild_id: String, - user_id: String, - channel_id: String, - created_at: { type: Date, required: true }, - event: { type: String, required: true }, - data: Object, -}); - -// @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 export interface InvalidatedEvent extends Event { diff --git a/util/src/util/Event.ts b/util/src/util/Event.ts index c088e8b3..53e74c5f 100644 --- a/util/src/util/Event.ts +++ b/util/src/util/Event.ts @@ -1,5 +1,5 @@ -import { Channel, ConsumeMessage } from "amqplib"; -import { EVENT, Event, EventModel } from "../models"; +import { Channel } from "amqplib"; +import { EVENT, Event } from "../models"; import { RabbitMQ } from "./RabbitMQ"; import EventEmitter from "events"; const events = new EventEmitter(); |