Update 'node/boto.js'

This commit is contained in:
Sarimoko 2022-02-12 05:08:18 +00:00
parent 61224c6f33
commit 987c8305eb
1 changed files with 20 additions and 0 deletions

View File

@ -20,5 +20,25 @@ const client = new tmi.Client({
client.connect(); client.connect();
// SCAN MSG | START
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
if(isModUp) { // !MODS | START
} // !MODS | END
if(isSub) { // !SUBS | START
}
if { // !ALL | START
}
}); // SCAN MSG | END