fix #7, many commands are now for mods instead of admins

This commit is contained in:
2025-09-14 14:07:35 +02:00
parent f2d6e6d320
commit d3ee8635b2
9 changed files with 16 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ import User from "user";
export default new Command({
name: 'addinvuln',
aliases: ['addinvuln'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -6,7 +6,7 @@ import { namedcheers } from "cheers";
export default new Command({
name: 'disablecheer',
aliases: ['disablecheer'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -5,7 +5,7 @@ import parseCommandArgs from "lib/parseCommandArgs";
export default new Command({
name: 'disablecommand',
aliases: ['disablecommand'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -6,7 +6,7 @@ import { namedcheers } from "cheers";
export default new Command({
name: 'enablecheer',
aliases: ['enablecheer'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -5,7 +5,7 @@ import parseCommandArgs from "lib/parseCommandArgs";
export default new Command({
name: 'enablecommand',
aliases: ['enablecommand'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -5,7 +5,7 @@ import User from "user";
export default new Command({
name: 'itemlock',
aliases: ['itemlock'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -7,7 +7,7 @@ import User from "user";
export default new Command({
name: 'removeinvuln',
aliases: ['removeinvuln'],
usertype: 'admin',
usertype: 'moderator',
disableable: false,
execution: async msg => {
const args = parseCommandArgs(msg.messageText);

View File

@@ -59,7 +59,7 @@ async function handleChatMessage(msg: EventSubChannelChatMessageEvent, user: Use
if (!streamerUsers.includes(msg.chatterId)) return;
break;
case "moderator":
if (!await redis.exists(`user:${user.id}:mod`)) return;
if (!(await redis.exists(`user:${user.id}:mod`) || await isAdmin(user.id))) return;
break;
};