I have no idea what I am doing x2
This commit is contained in:
parent
4cf153aaac
commit
93eee2f15d
|
@ -48,7 +48,7 @@ export class Emoji extends Base {
|
||||||
if (this.id === null) throw new Error('Emoji ID is not valid.')
|
if (this.id === null) throw new Error('Emoji ID is not valid.')
|
||||||
if (this.guild === undefined) throw new Error('Guild is undefined')
|
if (this.guild === undefined) throw new Error('Guild is undefined')
|
||||||
const roles = Array.isArray(data.roles)
|
const roles = Array.isArray(data.roles)
|
||||||
? data.roles?.map((role) => (role instanceof Role ? role.id : role))
|
? data.roles.map(role => (role instanceof Role ? role.id : role))
|
||||||
: [data.roles instanceof Role ? data.roles.id : data.roles]
|
: [data.roles instanceof Role ? data.roles.id : data.roles]
|
||||||
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,
|
...data,
|
||||||
|
@ -82,5 +82,5 @@ 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 | Role | string[] | Role[];
|
roles?: string | Role | Array<string | Role>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue