- voice_states_cache
ratelimiter:
-
# Prometheus monitoring configuration
monitoring:
"name": "@discordnova/nova-quickstart",
"version": "1.0.0",
"description": "Simple example of a nova deployment",
- "main": "index.js",
+ "main": "dist/index.js",
"repository": "https://github.com/discordnova/nova-quickstart",
"author": "MatthieuCoder",
"license": "Apache-2.0",
"dependencies": {
"@discordjs/builders": "^1.4.0",
"@discordjs/rest": "^1.5.0",
- "@types/node": "^18.11.18",
- "@types/ping": "^0.4.1",
"discord-api-types": "^0.37.25",
"events": "^3.3.0",
"glob-regex": "^0.3.2",
"nats": "^2.10.2",
"ping": "^0.4.2",
- "source-map-support": "^0.5.21",
+ "source-map-support": "^0.5.21"
+ },
+ "devDependencies": {
+ "@types/node": "^18.11.18",
+ "@types/ping": "^0.4.1",
"type-fest": "^3.5.0",
"typescript": "^4.9.4"
},
"scripts": {
"build": "tsc",
- "start": "tsc || true && node dist",
- "register": "tsc || true && node dist/register.js"
+ "start": "tsc && node dist/index.js",
+ "register": "tsc && node dist/register.js"
}
}
import { REST } from "@discordjs/rest";
import {
APIInteractionResponse,
- GatewayDispatchEvents,
GatewayDispatchPayload,
GatewayInteractionCreateDispatch,
- InteractionResponseType,
Routes,
} from "discord-api-types/v10";
import { CamelCase } from "type-fest";
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);
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));
"outDir": "dist",
"downlevelIteration": true,
"target": "ES5",
- "sourceMap": true
- }
+ "sourceMap": true,
+ "moduleResolution": "node",
+ "skipLibCheck": true
+ },
+
+ "exclude": ["node_modules"]
}
\ No newline at end of file