fix(Emoji): name can be null (#5513)

This commit is contained in:
Souji
2021-04-30 21:47:15 +02:00
committed by GitHub
parent c9b53539d5
commit 5397021efb
2 changed files with 3 additions and 3 deletions

View File

@@ -18,9 +18,9 @@ class Emoji extends Base {
/**
* The name of this emoji
* @type {string}
* @type {?string}
*/
this.name = emoji.name;
this.name = emoji.name ?? null;
/**
* The ID of this emoji

2
typings/index.d.ts vendored
View File

@@ -598,7 +598,7 @@ declare module 'discord.js' {
public readonly createdTimestamp: number | null;
public deleted: boolean;
public id: Snowflake | null;
public name: string;
public name: string | null;
public readonly identifier: string;
public readonly url: string | null;
public toJSON(): object;