import export setup

This commit is contained in:
Sarimoko 2022-02-14 03:29:53 -08:00
parent 8053eb44d9
commit 1666ba3b6b
3 changed files with 19 additions and 15 deletions

View File

@ -1,3 +1,4 @@
export function ttvalerts() {
// TTV Re-Active
// ==================================
// TO-DO: Add Follower API
@ -192,3 +193,4 @@ client.on("whisper", (from, userstate, message, self) => {
console.log('DM | From:'.green, from, userstate, 'MSG:'.green, message);
client.say(channel, `/me [+1] Inbox | Received a new SEXT message from: @`+ from +`!`);
});
}

View File

@ -24,6 +24,8 @@ client.connect();
import { rnguser } from "./rng.js";
rnguser();
import { ttvalerts } from "./alerts.js";
ttvalerts();
client.on('message', (channel, tags, message, self) => {
if(self) return;

View File

@ -1,6 +1,6 @@
export function rnguser() {
// RNG User
function getChatters(channelName, _attemptCount = 0) {
function getChatters(channelName, _attemptCount = 0) {
return rp({
uri: `https://tmi.twitch.tv/group/user/sarimoko/chatters`,
json: true
@ -18,7 +18,7 @@ function getChatters(channelName, _attemptCount = 0) {
}
throw err;
})
}
}
function getRandomChatter(channelName, opts = {}) {
let {