This commit is contained in:
jacob
2024-07-01 21:38:37 -05:00
parent 145eeb44ec
commit 26de63dc4b
4 changed files with 12 additions and 7 deletions

View File

@@ -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"

View File

@@ -1,7 +1,8 @@
/// <reference path="dependencies.d.ts" />
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

View File

@@ -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",

View File

@@ -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