mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 09:01:38 +01:00
fix #7, many commands are now for mods instead of admins
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user