summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-16 15:07:18 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-16 15:07:18 +0200
commite77678799e4ade391b2a9ef3fafc14f33894016a (patch)
treea416cc6824762ed217ec872aa084e100ebaef9d9 /util
parent:sparkles: update auth middleware (diff)
downloadserver-e77678799e4ade391b2a9ef3fafc14f33894016a.tar.xz
update Event
Diffstat (limited to 'util')
-rw-r--r--util/src/models/Event.ts16
-rw-r--r--util/src/util/Event.ts4
2 files changed, 2 insertions, 18 deletions
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();