mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 21:11:39 +01:00
fix #7, many commands are now for mods instead of admins
This commit is contained in:
16
README.md
16
README.md
@@ -87,7 +87,7 @@ It's theoretically possible to get 5 of each item.
|
||||
This depends on if the `CHATTER_IS_STREAMER` environment variable is set.
|
||||
If it's `true`, the chatterbot and streamerbot are the same account.
|
||||
|
||||
The chatterbot is the user that types in chat. They have very minimal required scopes as interacting with the stream is always done by the streamerbot. Only sending chat messages is done by the chatterbot.
|
||||
The chatterbot is the user that types in chat. They have very minimal required scopes as interacting with the stream is always done by the streamerbot. Only things the chatterbot does is relay whispers and send chat messages.
|
||||
|
||||
The streamerbot (not that streamerbot) is the broadcaster. This bot needs them to authenticate as well. This account will be used to perform moderation and watch the chat.
|
||||
|
||||
@@ -133,16 +133,16 @@ COMMAND|FUNCTION|USER|ALIASES|DISABLEABLE
|
||||
`gettimeout {target}`|Get the remaining timeout duration of targeted user|anyone|`gettimeout` `gett`|:white_check_mark:
|
||||
`stacking [on/off]`|Check/set if timeouts are stacking. Only admins can set the stacking state|anyone/admins|`stacking`|:x:
|
||||
`vulnchatters`|Get amount of chatters vulnerable to explosives|anyone|`vulnchatters` `vulnc`|:white_check_mark:
|
||||
`disablecommand {command/item}`|Disable a specific command/item|admins|`disablecommand`|:x:
|
||||
`enablecommand {command/item}`|Re-enable a specific command/item|admins|`enablecommand`|:x:
|
||||
`disablecheer {cheer}`|Disable a specific cheer event|admins|`disablecheer`|:x:
|
||||
`enablecheer {cheer}`|Re-enable a specific cheer event|admins|`enablecheer`|:x:
|
||||
`disablecommand {command/item}`|Disable a specific command/item|moderator|`disablecommand`|:x:
|
||||
`enablecommand {command/item}`|Re-enable a specific command/item|moderator|`enablecommand`|:x:
|
||||
`disablecheer {cheer}`|Disable a specific cheer event|moderator|`disablecheer`|:x:
|
||||
`enablecheer {cheer}`|Re-enable a specific cheer event|moderator|`enablecheer`|:x:
|
||||
`getinvulns`|Get a list of every invulnerable chatter in the channel|anyone|`getinvulns`|:x:
|
||||
`getadmins`|Get a list of every admin in the channel|anyone|`getadmins`|:x:
|
||||
`itemlock {target}`|Toggle the itemlock on the specified target|admins|`itemlock`|:x:
|
||||
`itemlock {target}`|Toggle the itemlock on the specified target|moderator|`itemlock`|:x:
|
||||
`testcheer {amount} [args]`|Create a fake cheering event|streamer/chatterbot|`testcheer`|:x:
|
||||
`addinvuln {target}`|Adds an invuln user|admins|`addinvuln`|:x:
|
||||
`removeinvuln {target}`|Removes an invuln user|admins|`removeinvuln`|:x:
|
||||
`addinvuln {target}`|Adds an invuln user|moderator|`addinvuln`|:x:
|
||||
`removeinvuln {target}`|Removes an invuln user|moderator|`removeinvuln`|:x:
|
||||
`addadmin {target}`|Adds an admin|streamer/chatterbot|`addadmin`|:x:
|
||||
`removeadmin {target}`|Removes an admin|streamer/chatterbot|`removeadmin`|:x:
|
||||
|
||||
|
||||
@@ -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