♻️ Cleaned lots of code and change getvip implementation
getVip is no longer time limited, it will remove it once a limit of vip users is reached (to be implemented)
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import { chatClient } from "../..";
|
||||
import { say } from "..";
|
||||
|
||||
// adds a user to vips
|
||||
async function addVip(
|
||||
channel: string,
|
||||
username: string,
|
||||
message?: string
|
||||
): Promise<void> {
|
||||
if (!message) {
|
||||
message = `Otorgado VIP a @${username}.`;
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
await chatClient.addVip(channel, username);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
await chatClient.addVip(channel, username);
|
||||
say(channel, message);
|
||||
if (message) {
|
||||
await say(channel, message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
export { addVip };
|
||||
|
Reference in New Issue
Block a user