From 810fabc79481c220fe7e976f08216c708b00fe09 Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Fri, 21 Oct 2022 20:14:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20Fixed=20some=20JS-C1003?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 12 ++++++------ src/schedules/shop/index.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index b65b076..3d1cefe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ import { Client, Collection, GatewayIntentBits } from "discord.js"; // discord.js import "dotenv/config"; -import * as command from "./handlers/command"; -import * as event from "./handlers/event"; -import * as schedule from "./handlers/schedule"; +import { register as commandRegister } from "./handlers/command"; +import { register as eventRegister } from "./handlers/event"; +import { start as scheduleStart } from "./handlers/schedule"; // Main process that starts all other sub processes const main = async () => { @@ -19,9 +19,9 @@ const main = async () => { // Create command collection client.commands = new Collection(); - await schedule.start(client); - await event.register(client); - await command.register(client); + await scheduleStart(client); + await eventRegister(client); + await commandRegister(client); // Authorize with Discord's API await client.login(process.env.DISCORD_TOKEN); diff --git a/src/schedules/shop/index.ts b/src/schedules/shop/index.ts index b2ef366..b1782c2 100644 --- a/src/schedules/shop/index.ts +++ b/src/schedules/shop/index.ts @@ -1,12 +1,12 @@ // Dependencies import { Client } from "discord.js"; -import * as roles from "./modules/roles"; +import { execute as RolesExecute } from "./modules/roles"; export const options = { schedule: "*/5 * * * *", // https://crontab.guru/ }; export const execute = async (client: Client) => { - await roles.execute(client); + await RolesExecute(client); };