Update 'node/boto.js'
This commit is contained in:
parent
2382f6febf
commit
22c7793124
28
node/boto.js
28
node/boto.js
|
@ -1,5 +1,3 @@
|
||||||
// B O T O
|
|
||||||
// ---
|
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const tmi = require('tmi.js');
|
const tmi = require('tmi.js');
|
||||||
const colors = require('colors');
|
const colors = require('colors');
|
||||||
|
@ -21,31 +19,9 @@ const client = new tmi.Client({
|
||||||
|
|
||||||
client.connect();
|
client.connect();
|
||||||
|
|
||||||
import { test } from "./ttv.js";
|
//import { test } from "./ttv.js";
|
||||||
test();
|
//test();
|
||||||
//import { rnguser } from "./rng.js";
|
//import { rnguser } from "./rng.js";
|
||||||
//rnguser();
|
//rnguser();
|
||||||
//import { ttvalerts } from "./alerts.js";
|
//import { ttvalerts } from "./alerts.js";
|
||||||
//ttvalerts();
|
//ttvalerts();
|
||||||
|
|
||||||
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();
|
|
||||||
});
|
|
Loading…
Reference in New Issue