From 26de63dc4b7660cdd960f6da4e7bf6aaa6013df2 Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 1 Jul 2024 21:38:37 -0500 Subject: [PATCH] y --- template-js/package.json | 3 ++- template-js/src/index.js | 6 ++++-- template-ts/package.json | 3 ++- template-ts/src/index.ts | 7 ++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/template-js/package.json b/template-js/package.json index 1054475..4446ee8 100644 --- a/template-js/package.json +++ b/template-js/package.json @@ -16,7 +16,8 @@ "dependencies": { "@sern/handler": "^3.0.3", "discord.js": "latest", - "dotenv": "^16.3.1" + "dotenv": "^16.3.1", + "@sern/publisher": "^1.0.0" }, "devDependencies": { "@types/node": "^18.0.25" diff --git a/template-js/src/index.js b/template-js/src/index.js index 69e328f..b9cf272 100644 --- a/template-js/src/index.js +++ b/template-js/src/index.js @@ -1,7 +1,8 @@ /// import 'dotenv/config' import { Client, GatewayIntentBits } from 'discord.js'; -import { Sern, single, makeDependencies } from '@sern/handler'; +import { Sern, makeDependencies } from '@sern/handler'; +import { Publisher } from '@sern/publisher' const client = new Client({ intents: [ @@ -19,7 +20,8 @@ const client = new Client({ * This is used for external event modules as well */ await makeDependencies(({ add }) => { - add('@sern/client', single(() => client)); + add('@sern/client', client); + add('publisher', new Publisher()); }); //View docs for all options diff --git a/template-ts/package.json b/template-ts/package.json index 23c392d..85155ef 100644 --- a/template-ts/package.json +++ b/template-ts/package.json @@ -18,7 +18,8 @@ "dependencies": { "@sern/handler": "^3.0.3", "discord.js": "latest", - "dotenv": "^16.3.1" + "dotenv": "^16.3.1", + "@sern/publisher": "^1.0.0" }, "devDependencies": { "@types/node": "^17.0.25", diff --git a/template-ts/src/index.ts b/template-ts/src/index.ts index f86abe2..5b0d9f3 100644 --- a/template-ts/src/index.ts +++ b/template-ts/src/index.ts @@ -1,7 +1,7 @@ import 'dotenv/config' import { Client, GatewayIntentBits } from 'discord.js'; -import { Sern, single, makeDependencies } from '@sern/handler'; - +import { Sern, makeDependencies } from '@sern/handler'; +import { Publisher } from '@sern/publisher' const client = new Client({ intents: [ GatewayIntentBits.Guilds, @@ -19,7 +19,8 @@ const client = new Client({ * This is used for external event modules as well */ await makeDependencies(({ add }) => { - add('@sern/client', single(() => client)); + add('@sern/client', client); + add('publisher', new Publisher()); }); //View docs for all options