Skip to content

Commit

Permalink
pause infiniteDurationText add checker + mongoose
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico105 committed Jan 23, 2022
1 parent 2aa439e commit 929ba47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/custom-databases/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
3 changes: 3 additions & 0 deletions src/Giveaway.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 929ba47

Please sign in to comment.