style: format structures/emoji.ts
This commit is contained in:
		
							parent
							
								
									9c048686c8
								
							
						
					
					
						commit
						c59d8f1639
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		|  | @ -5,7 +5,7 @@ import { Base } from './base.ts' | ||||||
| import { User } from './user.ts' | import { User } from './user.ts' | ||||||
| 
 | 
 | ||||||
| export class Emoji extends Base { | export class Emoji extends Base { | ||||||
|   id: string | null; |   id: string | null | ||||||
|   name: string |   name: string | ||||||
|   roles?: string[] |   roles?: string[] | ||||||
|   user?: User |   user?: User | ||||||
|  | @ -38,14 +38,14 @@ export class Emoji extends Base { | ||||||
| 
 | 
 | ||||||
|   /** Modify the given emoji. Requires the MANAGE_EMOJIS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */ |   /** Modify the given emoji. Requires the MANAGE_EMOJIS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event. */ | ||||||
|   async edit(guildID: string, data: ModifyGuildEmojiParams) { |   async edit(guildID: string, data: ModifyGuildEmojiParams) { | ||||||
|     const res = await this.client.rest.patch(EMOJI(guildID, this.id!)); |     const res = await this.client.rest.patch(EMOJI(guildID, this.id!)) | ||||||
|     return new Emoji(this.client, res); |     return new Emoji(this.client, res) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /** Delete the given emoji. Requires the MANAGE_EMOJIS permission. Returns `true` on success. Fires a Guild Emojis Update Gateway event. */ |   /** Delete the given emoji. Requires the MANAGE_EMOJIS permission. Returns `true` on success. Fires a Guild Emojis Update Gateway event. */ | ||||||
|   async delete(guildID: string): Promise<boolean> { |   async delete(guildID: string): Promise<boolean> { | ||||||
|     await this.client.rest.patch(EMOJI(guildID, this.id!)); |     await this.client.rest.patch(EMOJI(guildID, this.id!)) | ||||||
|     return true; |     return true | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   readFromData(data: EmojiPayload): void { |   readFromData(data: EmojiPayload): void { | ||||||
|  | @ -63,7 +63,7 @@ export class Emoji extends Base { | ||||||
| /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji-json-params */ | /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji-json-params */ | ||||||
| export interface ModifyGuildEmojiParams { | export interface ModifyGuildEmojiParams { | ||||||
|   /** Name of the emoji */ |   /** Name of the emoji */ | ||||||
|   name: string; |   name: string | ||||||
|   /** Roles to which this emoji will be whitelisted */ |   /** Roles to which this emoji will be whitelisted */ | ||||||
|   roles: string[] | null; |   roles: string[] | null | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue