add !modme command as backup

This commit is contained in:
2025-04-02 17:44:57 +02:00
parent b3bd11e513
commit 50750508ab
2 changed files with 13 additions and 1 deletions

View File

@@ -5,5 +5,6 @@ import inventory from "./inventory";
import stats from "./stats";
import mbucks from "./mbucks";
import getloot from "./getloot";
import modme from "./modme";
export default [timeout, thank, give, inventory, stats, mbucks, getloot]
export default [timeout, thank, give, inventory, stats, mbucks, getloot, modme]

11
src/commands/modme.ts Normal file
View File

@@ -0,0 +1,11 @@
import { createBotCommand } from "@twurple/easy-bot";
import api, { broadcasterApi } from "../lib/api";
const MODS = ['qwerinope']
export default createBotCommand('modme', async (_params, { userName, broadcasterId }) => {
if (!MODS.includes(userName)) return
if (broadcasterApi) await broadcasterApi.moderation.addModerator(broadcasterId, userName)
else await api.moderation.addModerator(broadcasterId, userName)
})