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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -