mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +01:00
renamed unbannableUsers to something better
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { streamerApi, streamerId, unbannableUsers } from "..";
|
||||
import { streamerApi, streamerId, streamerUsers } from "..";
|
||||
import { User } from "../user";
|
||||
|
||||
type SuccessfulTimeout = { status: true };
|
||||
@@ -10,7 +10,7 @@ type TimeoutResult = SuccessfulTimeout | UnSuccessfulTimeout;
|
||||
* @param reason - reason for timeout/ban
|
||||
* @param duration - duration of timeout. don't specifiy for ban */
|
||||
export const timeout = async (user: User, reason: string, duration?: number): Promise<TimeoutResult> => {
|
||||
if (unbannableUsers.includes(user.id)) return { status: false, reason: 'illegal' };
|
||||
if (streamerUsers.includes(user.id)) return { status: false, reason: 'illegal' };
|
||||
|
||||
// Check if user already has a timeout
|
||||
const banStatus = await streamerApi.moderation.getBannedUsers(streamerId, { userId: user.id }).then(a => a.data);
|
||||
|
||||
Reference in New Issue
Block a user