Compare commits

...

3 Commits

Author SHA1 Message Date
Alyxia Sother 5fc65e3c71
revert: Fix some leftover type errors 2021-12-29 20:26:31 +00:00
Alyxia Sother 3170d85376
Fix a CRITICAL BUG in the emote dump module 2021-12-29 20:17:39 +00:00
Alyxia Sother e7cc94408b
Fix some leftover type errors 2021-12-29 20:17:21 +00:00
2 changed files with 1644 additions and 1225 deletions

2843
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,18 +6,20 @@ function updateGlobalEmoteRegistry(): void {
const data: EmoteRegistryDump = {version: 1, list: []};
for (const guild of client.guilds.cache.values()) {
for (const emote of guild.emojis.cache.values()) {
data.list.push({
ref: emote.name,
id: emote.id,
name: emote.name,
requires_colons: emote.requiresColons ?? false,
animated: emote.animated ?? false,
url: emote.url,
guild_id: emote.guild.name,
guild_name: emote.guild.name
});
}
guild.fetch().then((g) => {
for (const emote of g.emojis.cache.values()) {
data.list.push({
ref: emote.name,
id: emote.id,
name: emote.name,
requires_colons: emote.requiresColons ?? false,
animated: emote.animated ?? false,
url: emote.url,
guild_id: emote.guild.name,
guild_name: emote.guild.name
});
}
});
}
FileManager.open("data/public"); // generate folder if it doesn't exist