summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/events/transport.ts2
-rw-r--r--src/handler/index.ts5
-rw-r--r--src/index.ts3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/events/transport.ts b/src/events/transport.ts
index 8228d2c..882ce41 100644
--- a/src/events/transport.ts
+++ b/src/events/transport.ts
@@ -4,10 +4,8 @@ import globRegex from "glob-regex";
import { REST } from "@discordjs/rest";
import {
APIInteractionResponse,
- GatewayDispatchEvents,
GatewayDispatchPayload,
GatewayInteractionCreateDispatch,
- InteractionResponseType,
Routes,
} from "discord-api-types/v10";
import { CamelCase } from "type-fest";
diff --git a/src/handler/index.ts b/src/handler/index.ts
index 16a56ed..9852d60 100644
--- a/src/handler/index.ts
+++ b/src/handler/index.ts
@@ -53,7 +53,10 @@ export const buildHandler = (commands: Iterable<Command>) => {
internal.set(command.json.name, command);
}
- return async (event: APIInteraction, reply?: (data: object) => void) => {
+ return async (
+ event: APIInteraction,
+ reply?: (data: APIInteractionResponse) => void
+ ) => {
console.log("executing: ", event.data);
if (event.type === InteractionType.ApplicationCommand) {
console.log("executing: ", event.data);
diff --git a/src/index.ts b/src/index.ts
index 7e5a5db..62cfdcb 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,11 +1,12 @@
import { EventClient } from "./events/index";
import { buildHandler } from "./handler";
import { commands } from "./commands";
+import { rest } from "./rest";
/**
* We instanciate our nova broken client.
*/
-const emitter = new EventClient();
+const emitter = new EventClient(rest);
// We register our slash command handler.
emitter.on("interactionCreate", buildHandler(commands));