chore: consistent return type

This commit is contained in:
ayntee 2020-12-25 20:45:21 +04:00
parent 6dd40afd3e
commit 104aa4249e

View file

@ -50,7 +50,7 @@ export class Emoji extends Base {
/** Delete the given emoji. Requires the MANAGE_EMOJIS permission. Returns `true` on success. Fires a Guild Emojis Update Gateway event. */
async delete(): Promise<boolean> {
if (this.guild === undefined) throw new Error('Guild is undefined')
if (this.guild === undefined) return false
await this.client.rest.patch(EMOJI(this.guild.id, this.id))
return true
}