timeout test
This commit is contained in:
parent
da19cda5ad
commit
b3c652d509
41
node/boto.js
41
node/boto.js
|
@ -20,6 +20,8 @@ const client = new tmi.Client({
|
||||||
client.connect();
|
client.connect();
|
||||||
|
|
||||||
// ALERTS START
|
// ALERTS START
|
||||||
|
// ================================
|
||||||
|
// --------------------------------
|
||||||
// client.on("action", (channel, userstate, message, self) => {
|
// client.on("action", (channel, userstate, message, self) => {
|
||||||
// // Don't listen to my own messages..
|
// // Don't listen to my own messages..
|
||||||
// if (self) return;
|
// if (self) return;
|
||||||
|
@ -27,12 +29,16 @@ client.connect();
|
||||||
// });
|
// });
|
||||||
// import { ttv_alerts } from "./alerts.js";
|
// import { ttv_alerts } from "./alerts.js";
|
||||||
// ttv_alerts();
|
// ttv_alerts();
|
||||||
|
// SUB | Anon => Paid
|
||||||
|
// --------------------------------
|
||||||
client.on("anongiftpaidupgrade", (channel, username, userstate) => {
|
client.on("anongiftpaidupgrade", (channel, username, userstate) => {
|
||||||
console.log('HYPE | @'.green+ username.yellow, 'just upgraded their Anon-Gift-Sub => PAID! Userstate?', userstate.yellow);
|
console.log('HYPE | @'.green+ username.yellow, 'just upgraded their Anon-Gift-Sub => PAID! Userstate?', userstate.yellow);
|
||||||
client.say(channel, `Legit, @`+ username, `just upgraded their Anon-Gift-Sub to a paid sub! Thanks for the support, I feel like a real boy!`);
|
client.say(channel, `Legit, @`+ username, `just upgraded their Anon-Gift-Sub to a paid sub! Thanks for the support, I feel like a real boy!`);
|
||||||
});
|
});
|
||||||
|
// MOD | Ban
|
||||||
|
// --------------------------------
|
||||||
client.on("ban", (channel, username, reason, userstate) => {
|
client.on("ban", (channel, username, reason, userstate) => {
|
||||||
console.log('');
|
console.log('MOD-LOG: @'.brightRed+ username.yellow, 'was banned for:'.brightRed, reason.yellow);
|
||||||
client.say(channel, `/me BYE FELICIA!!! Critical hit from the MODs Ban-Hammer attack!`);
|
client.say(channel, `/me BYE FELICIA!!! Critical hit from the MODs Ban-Hammer attack!`);
|
||||||
client.say(channel, `!kappagen BOP BOP BOP `);
|
client.say(channel, `!kappagen BOP BOP BOP `);
|
||||||
});
|
});
|
||||||
|
@ -42,6 +48,8 @@ client.on("ban", (channel, username, reason, userstate) => {
|
||||||
// // Do your stuff.
|
// // Do your stuff.
|
||||||
// console.log('LOG: Chat');
|
// console.log('LOG: Chat');
|
||||||
// });
|
// });
|
||||||
|
// HYPE | Bits / Cheer
|
||||||
|
// --------------------------------
|
||||||
client.on("cheer", (channel, userstate, message) => {
|
client.on("cheer", (channel, userstate, message) => {
|
||||||
console.log('HYPE |'.green, userstate.yellow, 'with msg of'.green, message.yellow)
|
console.log('HYPE |'.green, userstate.yellow, 'with msg of'.green, message.yellow)
|
||||||
if (message !== null){
|
if (message !== null){
|
||||||
|
@ -53,6 +61,8 @@ client.on("cheer", (channel, userstate, message) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
// CHAT | Chat-Mode | Cleared
|
||||||
|
// --------------------------------
|
||||||
client.on("clearchat", (channel) => {
|
client.on("clearchat", (channel) => {
|
||||||
console.log('LOG | Chat was cleared!'.brightRed)
|
console.log('LOG | Chat was cleared!'.brightRed)
|
||||||
client.say(channel, `Chat Rule Reminder`);
|
client.say(channel, `Chat Rule Reminder`);
|
||||||
|
@ -60,15 +70,19 @@ client.on("clearchat", (channel) => {
|
||||||
client.say(channel, `/me 2. Do NOT be a Troll!`);
|
client.say(channel, `/me 2. Do NOT be a Troll!`);
|
||||||
client.say(channel, `/me 3. Do NOT be another brick in the wall!`);
|
client.say(channel, `/me 3. Do NOT be another brick in the wall!`);
|
||||||
});
|
});
|
||||||
|
// DUPE | Connected & Connecting already logged in TMI
|
||||||
|
// --------------------------------
|
||||||
client.on("connected", (address, port) => {
|
client.on("connected", (address, port) => {
|
||||||
console.log('LOG | Connected @'.green, address.yellow, 'on port'.green, port);
|
// console.log('LOG | Connected @'.green, address.yellow, 'on port'.green, port);
|
||||||
});
|
});
|
||||||
client.on("connecting", (address, port) => {
|
client.on("connecting", (address, port) => {
|
||||||
console.log('LOG | Connecting @'.green, address.yellow, 'on port'.green, port);
|
// console.log('LOG | Connecting @'.green, address.yellow, 'on port'.green, port);
|
||||||
});
|
});
|
||||||
client.on("disconnected", (reason) => {
|
client.on("disconnected", (reason) => {
|
||||||
console.log('LOG |'.brightRed, reason.yellow, 'caused a disconnection...'.brightRed);
|
console.log('LOG |'.brightRed, reason.yellow, 'caused a disconnection...'.brightRed);
|
||||||
});
|
});
|
||||||
|
// CHAT | Chat-Mode | Emote only
|
||||||
|
// --------------------------------
|
||||||
client.on("emoteonly", (channel, enabled) => {
|
client.on("emoteonly", (channel, enabled) => {
|
||||||
console.log('CHAT MODE: Emotes Only ');
|
console.log('CHAT MODE: Emotes Only ');
|
||||||
});
|
});
|
||||||
|
@ -77,23 +91,33 @@ client.on("emoteonly", (channel, enabled) => {
|
||||||
// console.log('Emote Sets: IDK WHAT TO DO WITH THESE ');
|
// console.log('Emote Sets: IDK WHAT TO DO WITH THESE ');
|
||||||
// console.log(obj);
|
// console.log(obj);
|
||||||
// });
|
// });
|
||||||
|
// CHAT | Chat-Mode | Followers
|
||||||
|
// --------------------------------
|
||||||
client.on("followersonly", (channel, enabled, length) => {
|
client.on("followersonly", (channel, enabled, length) => {
|
||||||
console.log('CHAT MOD: Followers only enabled!');
|
console.log('CHAT MOD: Followers only enabled!');
|
||||||
});
|
});
|
||||||
|
// SUB | Gift => Paid
|
||||||
|
// --------------------------------
|
||||||
client.on("giftpaidupgrade", (channel, username, sender, userstate) => {
|
client.on("giftpaidupgrade", (channel, username, sender, userstate) => {
|
||||||
console.log('LOG: Gift-Sub UPGRADED to a real full blown sub! ');
|
console.log('LOG: Gift-Sub UPGRADED to a real full blown sub! ');
|
||||||
});
|
});
|
||||||
|
// HYPE | Hosted
|
||||||
|
// --------------------------------
|
||||||
client.on("hosted", (channel, username, viewers, autohost) => {
|
client.on("hosted", (channel, username, viewers, autohost) => {
|
||||||
console.log('LOG: TYVM! For the host!');
|
console.log('LOG: TYVM! For the host!');
|
||||||
client.say(channel, `/me TYVM @`+ username, `we may take your viewership of`, viewers+ `, but we'll never take their FREEDOM!!! sarimoFREEDOM`);
|
client.say(channel, `/me TYVM @`+ username, `we may take your viewership of`, viewers+ `, but we'll never take their FREEDOM!!! sarimoFREEDOM`);
|
||||||
client.say(channel, `!kappagen sarimoHYPE sarimoLURK`);
|
client.say(channel, `!kappagen sarimoHYPE sarimoLURK`);
|
||||||
});
|
});
|
||||||
|
// HYPE | Hosting
|
||||||
|
// --------------------------------
|
||||||
client.on("hosting", (channel, target, viewers) => {
|
client.on("hosting", (channel, target, viewers) => {
|
||||||
console.log('HYPE | Logging into'.yellow, 'Twitch TV'.brightBlue);
|
console.log('HYPE | Logging into'.yellow, 'Twitch TV'.brightBlue);
|
||||||
// HYPE | Hosting
|
// HYPE | Hosting
|
||||||
client.say(channel, `/me Stick around as we host @`+ target, `they may take our viewership of`, viewers +`, but we'll never take their FREEDOM!!! sarimoFREEDOM`);
|
client.say(channel, `/me Stick around as we host @`+ target, `they may take our viewership of`, viewers +`, but we'll never take their FREEDOM!!! sarimoFREEDOM`);
|
||||||
client.say(channel, `!kappagen sarimoNERD sarimoKO`);
|
client.say(channel, `!kappagen sarimoNERD sarimoKO`);
|
||||||
});
|
});
|
||||||
|
// CHAT | User Joined
|
||||||
|
// --------------------------------
|
||||||
client.on("join", (channel, username, self) => {
|
client.on("join", (channel, username, self) => {
|
||||||
console.log('LOG |'.brightBlue, username.yellow, 'joined the chat!'.brightBlue);
|
console.log('LOG |'.brightBlue, username.yellow, 'joined the chat!'.brightBlue);
|
||||||
if(username === 'cho0tem' ||
|
if(username === 'cho0tem' ||
|
||||||
|
@ -139,6 +163,8 @@ client.on("mods", (channel, mods) => {
|
||||||
client.on("notice", (channel, msgid, message) => {
|
client.on("notice", (channel, msgid, message) => {
|
||||||
console.log('LOG: Notice? '.yellow, msgid, message);
|
console.log('LOG: Notice? '.yellow, msgid, message);
|
||||||
});
|
});
|
||||||
|
// CHAT | User left
|
||||||
|
// --------------------------------
|
||||||
client.on("part", (channel, username, self) => {
|
client.on("part", (channel, username, self) => {
|
||||||
console.log('LOG:'.brightRed, username.yellow, 'left the chat...'.brightRed);
|
console.log('LOG:'.brightRed, username.yellow, 'left the chat...'.brightRed);
|
||||||
// client.say(channel, `/me -1 Chatter! Where's my bounty hunters? Essemble the *air-qoutes* search-party *air-qoutes*`);
|
// client.say(channel, `/me -1 Chatter! Where's my bounty hunters? Essemble the *air-qoutes* search-party *air-qoutes*`);
|
||||||
|
@ -168,6 +194,8 @@ client.on("resub", function (channel, username, months, message, userstate, meth
|
||||||
client.on("serverchange", (channel) => {
|
client.on("serverchange", (channel) => {
|
||||||
console.log('LOG | Server changed to:'.brightRed, channel);
|
console.log('LOG | Server changed to:'.brightRed, channel);
|
||||||
});
|
});
|
||||||
|
// CHAT | Chat-Mode | Slow
|
||||||
|
// --------------------------------
|
||||||
client.on("slowmode", (channel, enabled, length) => {
|
client.on("slowmode", (channel, enabled, length) => {
|
||||||
console.log('CHAT MODE: Slow Mode enabled! ');
|
console.log('CHAT MODE: Slow Mode enabled! ');
|
||||||
client.say(channel, `CHAT-MODE: Slow`);
|
client.say(channel, `CHAT-MODE: Slow`);
|
||||||
|
@ -192,12 +220,18 @@ client.on("subscription", function (channel, username, method, message, userstat
|
||||||
client.say(channel, `/me BLEEP! BLOOP! New subscriber! Spam your new emotes!!! Let's see you're fav!`);
|
client.say(channel, `/me BLEEP! BLOOP! New subscriber! Spam your new emotes!!! Let's see you're fav!`);
|
||||||
client.say(channel, `!kappagen sarimoKO sarimoNERD`);
|
client.say(channel, `!kappagen sarimoKO sarimoNERD`);
|
||||||
});
|
});
|
||||||
|
// MOD | Timeout
|
||||||
|
// --------------------------------
|
||||||
client.on("timeout", (channel, username, reason, duration, userstate) => {
|
client.on("timeout", (channel, username, reason, duration, userstate) => {
|
||||||
|
console.log('MOD-LOG | @'+ username, 'was banned for:', seconds, 'seconds | Reason:', reason);
|
||||||
|
client.say(channel, `Mods have spoken! @`+ username, `please take these`, seconds, `to reconsider:`, reason);
|
||||||
client.say(channel, `!kappagen sarimoSALT sarimoRAGE`);
|
client.say(channel, `!kappagen sarimoSALT sarimoRAGE`);
|
||||||
});
|
});
|
||||||
client.on("unhost", (channel, viewers) => {
|
client.on("unhost", (channel, viewers) => {
|
||||||
client.say(channel, `/me @Sarimoko has turned if hosting, please standby for further instruction!`);
|
client.say(channel, `/me @Sarimoko has turned if hosting, please standby for further instruction!`);
|
||||||
});
|
});
|
||||||
|
// MOD | Un-Modded
|
||||||
|
// --------------------------------
|
||||||
client.on("unmod", (channel, username) => {
|
client.on("unmod", (channel, username) => {
|
||||||
client.say(channel, `Oof, modship`);
|
client.say(channel, `Oof, modship`);
|
||||||
});
|
});
|
||||||
|
@ -210,3 +244,4 @@ client.on("whisper", (from, userstate, message, self) => {
|
||||||
client.say(channel, `/me [+1] Inbox | Received a new SEXT message from: @`+ from +`!`);
|
client.say(channel, `/me [+1] Inbox | Received a new SEXT message from: @`+ from +`!`);
|
||||||
});
|
});
|
||||||
// ALERTS STOP
|
// ALERTS STOP
|
||||||
|
// ================================
|
||||||
|
|
Loading…
Reference in New Issue