blob: 62cfdcb3f8612b831c0fad0675358906b5f99c1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  | 
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(rest);
// We register our slash command handler.
emitter.on("interactionCreate", buildHandler(commands));
// We connect ourselves to the nova nats broker.
emitter
  .start({
    additionalEvents: [],
    nats: {
      servers: ["localhost:4222"],
    },
    queue: "nova-worker-common",
  })
  .catch(console.log);
  |