Fix nitro emojis
This commit is contained in:
parent
51797c7426
commit
e0a033266a
1 changed files with 7 additions and 12 deletions
|
@ -554,18 +554,13 @@ api.events.on("lanyardUpdate", async () => {
|
||||||
pregenerate()
|
pregenerate()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < api.lanyard.activities.length; i++) {
|
var status = api.lanyard.custom_status
|
||||||
var activity = api.lanyard.activities[i]
|
if (status.emoji.id) {
|
||||||
if (activity.type == 4 && activity.emoji) {
|
if (status.emoji.animated) {
|
||||||
|
var emoji = Buffer.from(await (await fetch(`https://cdn.discordapp.com/emojis/${status.emoji.id}.gif?quality=lossless`)).arrayBuffer())
|
||||||
if (activity.emoji.id) {
|
|
||||||
if (activity.emoji.animated) {
|
|
||||||
var emoji = Buffer.from(await (await fetch(`https://cdn.discordapp.com/emojis/${activity.emoji.id}.gif?quality=lossless`)).arrayBuffer())
|
|
||||||
} else {
|
} else {
|
||||||
var emoji = Buffer.from(await (await fetch(`https://cdn.discordapp.com/emojis/${activity.emoji.id}.png?quality=lossless`)).arrayBuffer())
|
var emoji = Buffer.from(await (await fetch(`https://cdn.discordapp.com/emojis/${status.emoji.id}.png?quality=lossless`)).arrayBuffer())
|
||||||
}
|
|
||||||
fs.writeFileSync(path.join(__dirname, "cached/emojis", activity.emoji.id), emoji)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
fs.writeFileSync(path.join(__dirname, "cached/emojis", status.emoji.id), emoji)
|
||||||
}
|
}
|
||||||
})
|
})
|
Loading…
Reference in a new issue