Skip to content

Commit

Permalink
Fix TypeError: Invalid parameter(s)
Browse files Browse the repository at this point in the history
TypeError: Invalid parameter(s)
    at c (/usr/src/app/node_modules/enhanced-ms/dist/index.js:1:2015)
    at Object.interactionRun (/usr/src/app/src/commands/giveaways/giveaway.js:270:29)
    at Object.handleSlashCommand (/usr/src/app/src/handlers/command.js:140:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.exports (/usr/src/app/src/events/interactions/interactionCreate.js:18:5)
  • Loading branch information
saiteja-madha committed Jan 30, 2023
1 parent e82e1a5 commit 24072a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/giveaways/giveaway.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ module.exports = {
//
else if (sub === "edit") {
const messageId = interaction.options.getString("message_id");
const addDurationMs = ems(interaction.options.getInteger("add_duration"));
const addDur = interaction.options.getInteger("add_duration");
const addDurationMs = addDur ? ems(addDur) : null;
if (!addDurationMs) {
return interaction.followUp("Not a valid duration");
}
Expand Down

0 comments on commit 24072a2

Please sign in to comment.