summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-12 21:09:29 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-12 21:09:29 +0200
commitd50073fc41fc7d69d3dab9a2858158320983329b (patch)
treec4507ebe83019292807f5a4cf10fc8a522334e2a /util/src
parentMerge pull request #348 from AlTech98/fix-cdn-upload (diff)
downloadserver-d50073fc41fc7d69d3dab9a2858158320983329b.tar.xz
:art: remove long relatives paths -> short module paths
Diffstat (limited to 'util/src')
-rw-r--r--util/src/interfaces/Event.ts45
-rw-r--r--util/src/util/Constants.ts2
-rw-r--r--util/src/util/Database.ts2
3 files changed, 47 insertions, 2 deletions
diff --git a/util/src/interfaces/Event.ts b/util/src/interfaces/Event.ts
index ae966e42..5c2a01b0 100644
--- a/util/src/interfaces/Event.ts
+++ b/util/src/interfaces/Event.ts
@@ -423,6 +423,51 @@ export interface RelationshipRemoveEvent extends Event {
 	data: Omit<Relationship, "nickname">;
 }
 
+export type EventData =
+	| InvalidatedEvent
+	| ReadyEvent
+	| ChannelCreateEvent
+	| ChannelUpdateEvent
+	| ChannelDeleteEvent
+	| ChannelPinsUpdateEvent
+	| GuildCreateEvent
+	| GuildUpdateEvent
+	| GuildDeleteEvent
+	| GuildBanAddEvent
+	| GuildBanRemoveEvent
+	| GuildEmojiUpdateEvent
+	| GuildIntegrationUpdateEvent
+	| GuildMemberAddEvent
+	| GuildMemberRemoveEvent
+	| GuildMemberUpdateEvent
+	| GuildMembersChunkEvent
+	| GuildRoleCreateEvent
+	| GuildRoleUpdateEvent
+	| GuildRoleDeleteEvent
+	| InviteCreateEvent
+	| InviteDeleteEvent
+	| MessageCreateEvent
+	| MessageUpdateEvent
+	| MessageDeleteEvent
+	| MessageDeleteBulkEvent
+	| MessageReactionAddEvent
+	| MessageReactionRemoveEvent
+	| MessageReactionRemoveAllEvent
+	| MessageReactionRemoveEmojiEvent
+	| PresenceUpdateEvent
+	| TypingStartEvent
+	| UserUpdateEvent
+	| VoiceStateUpdateEvent
+	| VoiceServerUpdateEvent
+	| WebhooksUpdateEvent
+	| ApplicationCommandCreateEvent
+	| ApplicationCommandUpdateEvent
+	| ApplicationCommandDeleteEvent
+	| InteractionCreateEvent
+	| MessageAckEvent
+	| RelationshipAddEvent
+	| RelationshipRemoveEvent;
+
 // located in collection events
 
 export enum EVENTEnum {
diff --git a/util/src/util/Constants.ts b/util/src/util/Constants.ts
index 713d59da..d2cc5130 100644
--- a/util/src/util/Constants.ts
+++ b/util/src/util/Constants.ts
@@ -632,7 +632,7 @@ export const DiscordApiErrors = {
 	OAUTH2_APPLICATION_BOT_ABSENT: new ApiError("OAuth2 application does not have a bot", 50010),
 	MAXIMUM_OAUTH2_APPLICATIONS: new ApiError("OAuth2 application limit reached", 50011),
 	INVALID_OAUTH_STATE: new ApiError("Invalid OAuth2 state", 50012),
-	MISSING_PERMISSIONS: new ApiError("You lack permissions to perform that action", 50013),
+	MISSING_PERMISSIONS: new ApiError("You lack permissions to perform that action ({})", 50013, undefined, [""]),
 	INVALID_AUTHENTICATION_TOKEN: new ApiError("Invalid authentication token provided", 50014),
 	NOTE_TOO_LONG: new ApiError("Note was too long", 50015),
 	INVALID_BULK_DELETE_QUANTITY: new ApiError(
diff --git a/util/src/util/Database.ts b/util/src/util/Database.ts
index d3844cd9..c22d8abd 100644
--- a/util/src/util/Database.ts
+++ b/util/src/util/Database.ts
@@ -21,7 +21,7 @@ export function initDatabase() {
 		//
 		entities: Object.values(Models).filter((x) => x.constructor.name !== "Object"),
 		synchronize: true,
-		logging: false,
+		logging: true,
 		cache: {
 			duration: 1000 * 3, // cache all find queries for 3 seconds
 		},