javascript - Discord.js reply to message then wait for reply -
right want bot wait message user "!spec" when gets message want respond "see or change?" wait type "see" or "change" cant work, docs arent clear me , im not sure on how it.
this has able work in pm dont want spam discord plan do.
i have tried this:
if (command === 'spec'){ message.author.send("see or change?"); const collector = new discord.messagecollector(message.channel, m => m.author.id === message.author.id, { time: 10000 }); console.log(collector) collector.on('collect', message => { if (message.content === "see") { message.channel.send("you want see someones spec ok!"); } else if (message.content === "change") { message.channel.send("you want change spec ok!"); } })
i may writing wrong im not used library.
compare == , try.
if (command === 'spec'){ message.author.send("see or change?"); const collector = new discord.messagecollector(message.channel, m => m.author.id === message.author.id, { time: 10000 }); console.log(collector) collector.on('collect', message => { if (message.content == "see") { message.channel.send("you want see someones spec ok!"); } else if (message.content == "change") { message.channel.send("you want change spec ok!"); } })
wiki
Comments
Post a Comment