Skip to content

Commit

Permalink
fix(MessageUtils): embedStrings.finish.endMessage is being unused (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowplay1 authored Oct 9, 2024
2 parents 040f806 + b92d396 commit f99de7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/Giveaway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ export class Giveaway<

giveawayMessage.reply({
content: rerollMessage?.messageContent,
embeds: Object.keys(rerollMessage).length && rerollMessage?.messageContent ? [] : [rerolledEmbed]
embeds: Object.keys(rerollMessage).length === 1 && rerollMessage?.messageContent ? [] : [rerolledEmbed]
})

this._giveaways.emit('giveawayReroll', {
Expand Down
3 changes: 1 addition & 2 deletions src/lib/util/classes/MessageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ export class MessageUtils {

const finishDefaultedEmbedStrings: Partial<IGiveawayEmbedOptions> = {
...finishEmbedStrings,

color: finishEmbedStrings?.color || '#d694ff',
description: finishEmbedStrings?.description || 'Giveaway is over!'
}
Expand All @@ -287,7 +286,7 @@ export class MessageUtils {

const giveawayEndEmbed = this.buildGiveawayEmbed(
giveaway,
winnersCondition ? finishDefaultedEmbedStrings : embedStrings?.noWinnersEndMessage,
winnersCondition ? (embedStrings?.endMessage || embedStrings?.newGiveawayMessage || {}) : embedStrings?.noWinnersEndMessage,
winners
)

Expand Down

0 comments on commit f99de7b

Please sign in to comment.