From 5397021efb1f9883cf4b48a0ca78d12b713a61fd Mon Sep 17 00:00:00 2001 From: Souji Date: Fri, 30 Apr 2021 21:47:15 +0200 Subject: [PATCH] fix(Emoji): name can be null (#5513) --- src/structures/Emoji.js | 4 ++-- typings/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index 160f3a710fc8..801c85fb7152 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -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 diff --git a/typings/index.d.ts b/typings/index.d.ts index 540938614c1e..3b6ab82a70e6 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -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;