mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	Reverted changes except for the file location
This commit is contained in:
		
							parent
							
								
									5537cec29a
								
							
						
					
					
						commit
						f8d6c0d336
					
				
					 2 changed files with 7 additions and 3 deletions
				
			
		|  | @ -162,22 +162,24 @@ export function botHasPermission(guild: Guild | null, permission: number): boole | |||
| } | ||||
| 
 | ||||
| export function updateGlobalEmoteRegistry(): void { | ||||
|     const list: EmoteRegistryDumpEntry[] = []; | ||||
|     const data: EmoteRegistryDump = {version: 1, list: []}; | ||||
| 
 | ||||
|     for (const guild of client.guilds.cache.values()) { | ||||
|         for (const emote of guild.emojis.cache.values()) { | ||||
|             list.push({ | ||||
|             data.list.push({ | ||||
|                 ref: emote.name, | ||||
|                 id: emote.id, | ||||
|                 name: emote.name, | ||||
|                 requires_colons: emote.requiresColons || false, | ||||
|                 animated: emote.animated, | ||||
|                 url: emote.url, | ||||
|                 guild_id: 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.
 | ||||
|  |  | |||
|  | @ -108,11 +108,13 @@ export function getPrefix(guild: DiscordGuild | null): string { | |||
| } | ||||
| 
 | ||||
| export interface EmoteRegistryDumpEntry { | ||||
|     ref: string; | ||||
|     id: Snowflake; | ||||
|     name: string; | ||||
|     requires_colons: boolean; | ||||
|     animated: boolean; | ||||
|     url: string; | ||||
|     guild_id: Snowflake; | ||||
|     guild_name: string; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue