add vanish command

This commit is contained in:
Darius
2025-09-29 00:50:18 +02:00
parent dbfb4f5d86
commit b22cbf160c
3 changed files with 92 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
import type { ChatMessage } from "@twurple/chat";
import { purgeByIds } from "../../util/api-functions.ts";
import { logSuccess } from "../../util/logger.ts";
import { BaseCommand } from "../base-command.ts";
import type { ICommandRequirements } from "../interface.ts";
export class VanishCommand extends BaseCommand {
name = "v";
cooldown = 0;
enabled = true;
requirements: ICommandRequirements = {
developer: false,
mod: false,
};
triggered = async (
channel: string,
user: string,
_text: string,
msg: ChatMessage,
) => {
logSuccess(`${channel} ${user} vanish command triggered`);
if (msg.channelId) {
purgeByIds(msg.channelId, msg.userInfo.userId);
}
};
}