Reverted changes except for the file location
This commit is contained in:
parent
5537cec29a
commit
f8d6c0d336
|
@ -162,22 +162,24 @@ export function botHasPermission(guild: Guild | null, permission: number): boole
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateGlobalEmoteRegistry(): void {
|
export function updateGlobalEmoteRegistry(): void {
|
||||||
const list: EmoteRegistryDumpEntry[] = [];
|
const data: EmoteRegistryDump = {version: 1, list: []};
|
||||||
|
|
||||||
for (const guild of client.guilds.cache.values()) {
|
for (const guild of client.guilds.cache.values()) {
|
||||||
for (const emote of guild.emojis.cache.values()) {
|
for (const emote of guild.emojis.cache.values()) {
|
||||||
list.push({
|
data.list.push({
|
||||||
|
ref: emote.name,
|
||||||
id: emote.id,
|
id: emote.id,
|
||||||
name: emote.name,
|
name: emote.name,
|
||||||
requires_colons: emote.requiresColons || false,
|
requires_colons: emote.requiresColons || false,
|
||||||
animated: emote.animated,
|
animated: emote.animated,
|
||||||
url: emote.url,
|
url: emote.url,
|
||||||
|
guild_id: emote.guild.name,
|
||||||
guild_name: emote.guild.name
|
guild_name: emote.guild.name
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FileManager.write("emote-registry", {version: 1, list}, true);
|
FileManager.write("emote-registry", data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pagination function that allows for customization via a callback.
|
// Pagination function that allows for customization via a callback.
|
||||||
|
|
|
@ -108,11 +108,13 @@ export function getPrefix(guild: DiscordGuild | null): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EmoteRegistryDumpEntry {
|
export interface EmoteRegistryDumpEntry {
|
||||||
|
ref: string;
|
||||||
id: Snowflake;
|
id: Snowflake;
|
||||||
name: string;
|
name: string;
|
||||||
requires_colons: boolean;
|
requires_colons: boolean;
|
||||||
animated: boolean;
|
animated: boolean;
|
||||||
url: string;
|
url: string;
|
||||||
|
guild_id: Snowflake;
|
||||||
guild_name: string;
|
guild_name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue