sync from github

This commit is contained in:
minster586
2025-08-25 01:16:23 -04:00
parent 3c95ac2361
commit 9384c57f43
53 changed files with 6941 additions and 1347 deletions

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 800 800">
<!-- Generator: Adobe Illustrator 29.0.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 186) -->
<defs>
<style>
.st0 {
fill: #fff;
}
</style>
</defs>
<path class="st0" d="M694.3,279.9c-.8,47.8-15.1,88-42.8,120.7-26.8,33.5-63.3,56.2-109.4,67.9-26.8,5.9-50.7,13.4-71.7,22.6-21.8,10.1-41.1,26-57.9,47.8-13.4,19.3-25.6,42.4-36.5,69.2-12.6,31-28.1,58.7-46.5,83-18.5,25.2-44.9,38.1-79.2,39-44.5-3.4-77.2-25.6-98.1-66.7-21-41.9-34-88.9-39-140.9-5.9-52-8.4-94.3-7.5-127,0-57,10.5-110.3,31.4-159.7,21.8-49.5,59.1-87.6,111.9-114.5,46.1-20.9,96.4-32.7,150.9-35.2,55.3-2.5,106.9,4.2,154.7,20.1,38.6,12.6,71.3,34,98.1,64.1,26,31,39.8,67.5,41.5,109.4Z"/>
</svg>

After

Width:  |  Height:  |  Size: 813 B

View File

@@ -0,0 +1,3 @@
#chat .event.patreon .message {
background: rgba(255,89,0,0.75);
}

View File

@@ -0,0 +1,60 @@
/* ------------------------- */
/* PATREON MODULE VARIABLES */
/* ------------------------- */
const showPatreon = getURLParam("showPatreon", true);
const showPatreonMemberships = getURLParam("showPatreonMemberships", true);
// PATREON EVENTS HANDLERS
const patreonHandlers = {
'Patreon.PledgeCreated': (response) => {
patreonMemberships(response.data);
},
};
if (showPatreon) {
registerPlatformHandlersToStreamerBot(patreonHandlers, '[Patreon]');
}
// PATREON EVENTS FUNCTIONS
async function patreonMemberships(data) {
if (showPatreonMemberships == false) return;
const template = eventTemplate;
const clone = template.content.cloneNode(true);
const messageId = createRandomString(40);
const userId = createRandomString(40);
const {
header,
platform,
user,
action,
value,
'actual-message': message
} = Object.fromEntries(
[...clone.querySelectorAll('[class]')]
.map(el => [el.className, el])
);
const classes = ['patreon', 'membership'];
header.remove();
var money = (data.attributes.will_pay_amount_cents / 100).toFixed(2);
user.innerHTML = `<strong>${data.attributes.full_name}</strong>`;
action.innerHTML = ` donated `;
value.innerHTML = `<strong>${money}</strong>`;
message.remove();
addEventItem('patreon', clone, classes, userId, messageId);
}