feat(handler) : refactored ready event and finished loading command

plugins
This commit is contained in:
Jacob Nguyen
2022-04-15 22:45:01 -05:00
parent f213e88a5d
commit 4e1a8066d2
3 changed files with 31 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import type { Client } from "discord.js";
import type { Module } from "../..";
import { Module, Sern } from "../..";
import { CommandPlugin, Controller, PluginType } from "./plugin";
export function reload(
@@ -13,6 +13,7 @@ export function reload(
async execute(client : Client, module: Module, controller : Controller ) {
const curGuild = await client.guilds.fetch(data.guildId);
await curGuild.commands.edit(data.applicationId, {
type : Sern.cmdTypeToDjs(module.type),
name : module.name!,
description: module.description,
})