Update statuses to work with new API

This commit is contained in:
bingus_violet 2024-06-27 00:13:43 -05:00
parent 05f1e11ea4
commit 53314a14fb

View file

@ -207,8 +207,8 @@ function converter(html, dynamic = true) {
<a class="chip" href="/faq">Nerd FAQ</a></h3>
</div>`,
"CUSTOM_STATUS": () => {
if (api.lanyard.activities[0] && api.lanyard.activities[0].type == 4) {
var status = api.lanyard.activities[0]
if (api.lanyard.custom_status) {
var status = api.lanyard.custom_status
var addedHTML = "<hr/><p>"
if (status.emoji) {
if (status.emoji.id) {
@ -218,7 +218,7 @@ function converter(html, dynamic = true) {
}
}
addedHTML += makeHtmlSafe(status.state)
addedHTML += makeHtmlSafe(status.text)
addedHTML += "</p>"
return addedHTML
}