Remove redundant null assertion

This commit is contained in:
ayntee 2020-12-26 10:38:20 +04:00
parent 0a066a32e4
commit 678e988aec

View file

@ -47,7 +47,7 @@ export class Emoji extends Base {
async edit(data: ModifyGuildEmojiParams): Promise<Emoji> {
if (this.id === null) throw new Error('Emoji ID is not valid.')
if (this.guild === undefined) throw new Error('Guild is undefined')
const res = await this.client.rest.patch(EMOJI(this.guild.id, this.id!), {
const res = await this.client.rest.patch(EMOJI(this.guild.id, this.id), {
...data,
roles: data.roles?.map((role) => role.id)
})