ADDED Ko-Fi, Fourthwall, TipeeeStream and Patreon

This commit is contained in:
Rodrigo Emanuel
2025-05-14 17:58:19 -03:00
committed by GitHub
parent ad95369878
commit e103df9e3f
17 changed files with 953 additions and 21 deletions

47
js/tipeeestream/module.js Normal file
View File

@@ -0,0 +1,47 @@
const showTipeeeDonations = getURLParam("showTipeeeDonations", true);
const tipeeeHandlers = {
'TipeeeStream.Donation': (response) => {
console.debug('TipeeeStream Donation', response.data);
tipeeeStreamDonation(response.data);
},
};
for (const [event, handler] of Object.entries(tipeeeHandlers)) {
streamerBotClient.on(event, handler);
}
async function tipeeeStreamDonation(data) {
if (showTipeeeDonations == false) return;
const {
user: userName,
amount,
currency,
message: text
} = data;
const userID = createRandomString(40);
const messageID = createRandomString(40);
const [avatar, message] = await Promise.all([
'',
currentLang.tipeeestream.tip({
money : formatCurrency(amount,currency),
message: text
})
]);
const classes = '';
const messageData = {
classes: classes,
avatar,
badges: '',
userName,
color: '#FFF',
message,
reply: '',
};
addEventToChat(userID, messageID, 'tipeeestream', messageData);
}