From 879bf95be50f40d5c3d7cc3376558f95fd916d73 Mon Sep 17 00:00:00 2001 From: cAttte <26514199+cAttte@users.noreply.github.com> Date: Sun, 17 Jan 2021 04:00:47 -0300 Subject: [PATCH] fix(entities/Suggestion): also use identifier in deletion message in displayEmbed() --- src/entities/Suggestion.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/entities/Suggestion.ts b/src/entities/Suggestion.ts index 633fae0d..378fa8bd 100644 --- a/src/entities/Suggestion.ts +++ b/src/entities/Suggestion.ts @@ -145,19 +145,20 @@ export default class Suggestion extends BaseEntity { } async displayEmbed(client: Client): Promise { + const identifier = await this.getIdentifier() + if (this.deletedAt) { const deleter = this.deleter === this.author ? "the author" : `<@${this.deleter}>` return { color: client.config.colors.error, - description: `**#${this.number}**: The suggestion has been deleted by ${deleter}.` + description: `**#${identifier}**: The suggestion has been deleted by ${deleter}.` } } - const displayNumber = await this.getIdentifier() const embed: Discord.MessageEmbedOptions = { color: "#999999", - author: { name: `#${displayNumber} — ${this.title}` }, + author: { name: `#${identifier} — ${this.title}` }, thumbnail: { url: null }, description: this.body, fields: []