diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index e6a2d4d..65ec19f 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -22,14 +22,11 @@ jobs: - name: Install Node.js dependencies run: npm i -g prettier && npm i - - name: Run Prettier - run: prettier --write . - - name: Convert TypeScript to JavaScript run: npx babel TypeScript --out-dir JavaScript --extensions ".ts" - name: Run JavaScript Prettier - run: prettier --write ./JavaScript + run: prettier --write . - name: Create Pull Request id: cpr diff --git a/TypeScript/disable.ts b/TypeScript/disable.ts index 68efa42..5fc2f1f 100644 --- a/TypeScript/disable.ts +++ b/TypeScript/disable.ts @@ -1,36 +1,38 @@ -// @ts-nocheck -/** - * Disables a command entirely, for whatever reasons you may need. - * - * @author @jacoobes [<@182326315813306368>] - * @version 1.0.0 - * @example - * ```ts - * import { disable } from "../plugins/disable"; - * import { commandModule } from "@sern/handler"; - * export default commandModule({ - * plugins: [ disable() ], - * execute: (ctx) => { - * //your code here - * } - * }) - * ``` - */ - import { CommandType, EventPlugin, PluginType } from "@sern/handler"; - import { InteractionReplyOptions, ReplyMessageOptions } from "discord.js"; - - export function disable( - onFail?: string | Omit | ReplyMessageOptions - ): EventPlugin { - return { - type: PluginType.Event, - description: "Disables command from responding", - async execute([ctx], controller) { - if(onFail !== undefined) { - await ctx.reply(onFail); - } - return controller.stop(); - } - }; - } - \ No newline at end of file +// @ts-nocheck +/** + * Disables a command entirely, for whatever reasons you may need. + * + * @author @jacoobes [<@182326315813306368>] + * @version 1.0.0 + * @example + * ```ts + * import { disable } from "../plugins/disable"; + * import { commandModule } from "@sern/handler"; + * export default commandModule({ + * plugins: [ disable() ], + * execute: (ctx) => { + * //your code here + * } + * }) + * ``` + */ +import { CommandType, EventPlugin, PluginType } from "@sern/handler"; +import { InteractionReplyOptions, ReplyMessageOptions } from "discord.js"; + +export function disable( + onFail?: + | string + | Omit + | ReplyMessageOptions +): EventPlugin { + return { + type: PluginType.Event, + description: "Disables command from responding", + async execute([ctx], controller) { + if (onFail !== undefined) { + await ctx.reply(onFail); + } + return controller.stop(); + }, + }; +}