Liam Skinner
Liam Skinner

Reputation: 26

discord.js muted command - reason fucntion

The Code Works, just not the reason

const reason = args[2] || args.slice(1, args.length - 2).join(" ");

this will only display the last two words of the reason, I dont know why? how do I turn it to include the entire reason

(command is `!mute @member [time] [reason])

Upvotes: 0

Views: 52

Answers (1)

Liam Skinner
Liam Skinner

Reputation: 26

const time = args[1]
const reason = args.slice(2).join(" ");

Upvotes: 1

Related Questions