summaryrefslogtreecommitdiff
path: root/src/sys/handler/builder.ts
diff options
context:
space:
mode:
authorMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-05 02:21:48 +0400
committerMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-05 02:21:48 +0400
commit9fca912692e3b7867e5f900d936bd15c754b107e (patch)
tree193f212247cb464ebbe3c98072278b8b4c8eb507 /src/sys/handler/builder.ts
parent3fd9efd18867cdf7452e7d0b3cbc3f33d508e699 (diff)
add linting
Diffstat (limited to 'src/sys/handler/builder.ts')
-rw-r--r--src/sys/handler/builder.ts26
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};
+ }
}