From 929ba4713bd832a261e640e8387e082d638c6f8d Mon Sep 17 00:00:00 2001 From: Nico105 <63612668+Nico105@users.noreply.github.com> Date: Sun, 23 Jan 2022 17:40:54 +0100 Subject: [PATCH] pause infiniteDurationText add checker + mongoose --- examples/custom-databases/mongoose.js | 3 ++- src/Giveaway.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/custom-databases/mongoose.js b/examples/custom-databases/mongoose.js index 4b5b05c8..e429610b 100644 --- a/examples/custom-databases/mongoose.js +++ b/examples/custom-databases/mongoose.js @@ -66,7 +66,8 @@ const giveawaySchema = new mongoose.Schema({ content: String, unPauseAfter: Number, embedColor: mongoose.Mixed, - durationAfterPause: Number + durationAfterPause: Number, + infiniteDurationText: String }, isDrop: Boolean, allowedMentions: { diff --git a/src/Giveaway.js b/src/Giveaway.js index eae8711f..920074b4 100644 --- a/src/Giveaway.js +++ b/src/Giveaway.js @@ -949,6 +949,9 @@ class Giveaway extends EventEmitter { if (validateEmbedColor(options.embedColor)) { pauseOptions.embedColor = options.embedColor; } + if (typeof options.infiniteDurationText === 'string') { + pauseOptions.infiniteDurationText = options.infiniteDurationText; + } pauseOptions.isPaused = true; this.options.pauseOptions = pauseOptions;