add easy setup

This commit is contained in:
Darius
2025-09-26 19:05:49 +02:00
parent 95693c0201
commit a0a76a8b75
18 changed files with 313 additions and 54 deletions

View File

@@ -0,0 +1,14 @@
import { chatClient } from "../core/chat-client.ts";
import type { ICommand, ICommandRequirements } from "./interface";
export abstract class BaseCommand implements ICommand {
protected get chatClient() {
return chatClient;
}
abstract name: string;
abstract cooldown: number;
abstract enabled: boolean;
abstract triggered(...args: unknown[]): Promise<unknown>;
abstract requirements: ICommandRequirements;
}

View File

@@ -1,8 +1,9 @@
import type { ChatMessage } from "@twurple/chat";
import { logSuccess } from "../logger/logger.ts";
import type { ICommand, ICommandRequirements } from "./interface.ts";
import { logSuccess } from "../util/logger.ts";
import { BaseCommand } from "./base-command.ts";
import type { ICommandRequirements } from "./interface.ts";
export class SongCommand implements ICommand {
export class SongCommand extends BaseCommand {
name = "song";
cooldown = 0;
enabled = true;