diff options
| author | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-05 02:21:48 +0400 |
|---|---|---|
| committer | MatthieuCoder <matthieu@matthieu-dev.xyz> | 2023-01-05 02:21:48 +0400 |
| commit | 9fca912692e3b7867e5f900d936bd15c754b107e (patch) | |
| tree | 193f212247cb464ebbe3c98072278b8b4c8eb507 /src/sys/handler/builder.ts | |
| parent | 3fd9efd18867cdf7452e7d0b3cbc3f33d508e699 (diff) | |
add linting
Diffstat (limited to 'src/sys/handler/builder.ts')
| -rw-r--r-- | src/sys/handler/builder.ts | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/sys/handler/builder.ts b/src/sys/handler/builder.ts index feb5780..71732a8 100644 --- a/src/sys/handler/builder.ts +++ b/src/sys/handler/builder.ts @@ -1,22 +1,18 @@ -import { SlashCommandBuilder } from "@discordjs/builders"; -import { Command, HandlerFn } from "."; +import {SlashCommandBuilder} from '@discordjs/builders'; +import {type Command, type HandlerFn} from '.'; /** - * Simple wrapper around the SlashCommandBuilder provided by Discord.js + * Simple wrapper around the SlashCommandBuilder provided by Discord.js */ export class CommandBuilder extends SlashCommandBuilder { - private _handler: HandlerFn; + private _handler: HandlerFn; - constructor() { - super(); - } + handler(handler: HandlerFn): this { + this._handler = handler; + return this; + } - handler(handler: HandlerFn): this { - this._handler = handler; - return this; - } - - build(): Command { - return { json: this.toJSON(), handler: this._handler }; - } + build(): Command { + return {json: this.toJSON(), handler: this._handler}; + } } |
