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'
|
||||
|
||||
export class Emoji extends Base {
|
||||
id: string | null;
|
||||
id: string | null
|
||||
name: string
|
||||
roles?: string[]
|
||||
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. */
|
||||
async edit(guildID: string, data: ModifyGuildEmojiParams) {
|
||||
const res = await this.client.rest.patch(EMOJI(guildID, this.id!));
|
||||
return new Emoji(this.client, res);
|
||||
const res = await this.client.rest.patch(EMOJI(guildID, this.id!))
|
||||
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. */
|
||||
async delete(guildID: string): Promise<boolean> {
|
||||
await this.client.rest.patch(EMOJI(guildID, this.id!));
|
||||
return true;
|
||||
await this.client.rest.patch(EMOJI(guildID, this.id!))
|
||||
return true
|
||||
}
|
||||
|
||||
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 */
|
||||
export interface ModifyGuildEmojiParams {
|
||||
/** Name of the emoji */
|
||||
name: string;
|
||||
name: string
|
||||
/** Roles to which this emoji will be whitelisted */
|
||||
roles: string[] | null;
|
||||
}
|
||||
roles: string[] | null
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue