Jump to content


Photo
Question

Chat commands /wait until the user sends a message/

node.js node-steam-user

  • Please log in to reply
4 replies to this topic

#1 tvman99

tvman99

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 02 August 2018 - 11:47 AM

I've been trying to make async/await work. If someone sends specific message they get specific pre-written reply. I've done that using friendMessage ID event. Down the road, I need to catch the user's reply to include it in the reply. Well i assume if i give you an example of it. Ofc the user should start it as long as bot does something depends on the chat message/ i call it chat command/.

 

User: !addadmin

Bot: Who's it? Send the steamid64 to me.

User: xxxxxxxxxxxxxxxxx /*sends steamid64*/

Bot: xxxxxxxxxxxxxxxxx is not in my friends list. Tell him to add me. OR Bot: xxxxxxxxxxxxxxxxx is in my friends list. Made him/her the master of me. 

 

It was an example. If you are able to, code the catching of user reply and using it in some checks then replies.



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 02 August 2018 - 01:21 PM

You're crossing into natural language processing territory there.



#3 tvman99

tvman99

    Newbie

  • Member
  • Pip
  • 7 posts

Posted 03 August 2018 - 02:52 AM

So there is no way to do it? 



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 03 August 2018 - 09:59 AM

There is, but it's too in-depth to go into here.



#5 Royalgamer06

Royalgamer06

    Advanced Member

  • Member
  • PipPipPip
  • 87 posts

Posted 30 August 2018 - 05:27 PM

Can't you just turn the callback of the friendMessage ID event into a promise and await that in an async function?







Also tagged with one or more of these keywords: Question, node.js, node-steam-user

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users