Update 'node/ttv.js'

This commit is contained in:
Sarimoko 2022-02-14 13:43:17 +00:00
parent b5ba3d5098
commit 2382f6febf
1 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,23 @@
export function test() {
console.log(`Import successful!`.green)
client.on('message', (channel, tags, message, self) => {
if(self) return;
const badges = tags.badges || {}; // Scan Badges
const isBroadcaster = badges.broadcaster; // Define Streamer
const isMod = badges.moderator; // Define Mod
const isModUp = isBroadcaster || isMod; // Permission Merge = Mod+Streamer
const isSub = badges.subscriber || badges.founder; // Define Subs
const botUserState = client.userstate[channel]; // MOD Status Check
const amMod = botUserState !== undefined && botUserState.mod === true; // Define Mod Status
if(self || !message.startsWith('!')) return; // Command Parser
const args = message.slice(1).split(' ');
const command = args.shift().toLowerCase(); // !COMMAND => command
//import { ttv_cmd_general } from "./cmd/general.js";
//cmd_general();
// import { cmd_subs } from "./cmd/subs.js";
// cmd_suds();
// import { cmd_mods } from "./cmd/mods.js";
// cmd_mods();
});
}