diff --git a/README.md b/README.md index 3553a1fd..6adcf08e 100644 --- a/README.md +++ b/README.md @@ -350,6 +350,8 @@ client.giveawaysManager.start(interaction.channel, { ^^^ You can [access giveaway properties](https://github.com/Androz2091/discord-giveaways#access-giveaway-properties-in-messages). - **pauseOptions.unPauseAfter**: the number of milliseconds after which the giveaway will automatically unpause. - **pauseOptions.embedColor**: the color of the embed when the giveaway is paused. +- **pauseOptions.infiniteDurationText**: The text that gets displayed next to "GiveawayMessages#drawing" in the paused embed, when there is no "unPauseAfter". +^^^ You can [access giveaway properties](https://github.com/Androz2091/discord-giveaways#access-giveaway-properties-in-messages). diff --git a/src/Constants.js b/src/Constants.js index 8fe09670..811b5f32 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -107,13 +107,15 @@ exports.LastChanceOptions = { * @property {number} [unPauseAfter=null] The number of milliseconds after which the giveaway will automatically unpause. * @property {Discord.EmbedColorResolveAble} [embedColor='#FFFF00'] The color of the embed when the giveaway is paused. * @property {number} [durationAfterPause=null|giveaway.remainingTime] The remaining duration after the giveaway is unpaused. ⚠ This property gets set by the manager so that the pause system works properly. It is not recommended to set it manually! + * @property {string} [infiniteDurationText='`NEVER`'] The text that gets displayed next to "GiveawayMessages#drawing" in the paused embed, when there is no "unPauseAfter". */ exports.PauseOptions = { isPaused: false, content: '⚠️ **THIS GIVEAWAY IS PAUSED !** ⚠️', unPauseAfter: null, embedColor: '#FFFF00', - durationAfterPause: null + durationAfterPause: null, + infiniteDurationText: '`NEVER`' }; /** diff --git a/src/Manager.js b/src/Manager.js index df6a7c5d..6bd0edc3 100644 --- a/src/Manager.js +++ b/src/Manager.js @@ -98,7 +98,7 @@ class GiveawaysManager extends EventEmitter { '\n' + giveaway.messages.drawing.replace( '{timestamp}', - giveaway.endAt === Infinity ? '`NEVER`' : `` + giveaway.endAt === Infinity ? giveaway.pauseOptions.infiniteDurationText : `` ) ) + (giveaway.hostedBy ? '\n' + giveaway.messages.hostedBy : '') diff --git a/typings/index.d.ts b/typings/index.d.ts index fef96ab1..24911bde 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -63,6 +63,7 @@ declare module 'discord-giveaways' { unPauseAfter: number; embedColor: ColorResolvable; durationAfterPause: number; + infiniteDurationText: string; } interface GiveawaysManagerOptions { storage?: string;