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); };