简体   繁体   中英

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])

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM