Fix: Make offline happen when channel is offline, not online

This commit is contained in:
Tyler-A 2020-01-09 17:39:42 -06:00
parent 7db141cb7d
commit 0c3567c2ca

View file

@ -1,7 +1,7 @@
// //
// Twitch.ts // Twitch.ts
// //
// Written by: Tyler Akins (2020/01/06 - 2020/01/08) // Written by: Tyler Akins (2020/01/06 - 2020/01/09)
// //
@ -71,10 +71,10 @@ export const START_BOT = async () => {
.then((response: boolean) => { .then((response: boolean) => {
// Ensure the user is live // Ensure the user is live
if (response) { if (!response) {
data["offline"].total_bits += bits; data["offline"].total_bits += bits;
data["offline"].donations.push(bits); data["offline"].donations.push(bits);
data["offline"].donators.push(donator) data["offline"].donators.push(donator);
} else { } else {
// Data already exists // Data already exists