Jump to content
McKay Development

Send Friend Request Automatically


Ze das Couves

Recommended Posts

  • Ze das Couves changed the title to Send Friend Request Automatically
client.on('friendMessage', function(steamID, message){
    var msg_him=Object.keys(Config.reply);
    var msg_my=Object.values(Config.reply);
    var replycount=msg_my.length;
    for (var i = replycount - 1; i >= 0; i--) {
        if (message==msg_him[i]) {
          //if (message.indexOf(msg_him[i]) >= 0)
            client.chatMessage(steamID,msg_my[i]);
        }
    }
})

Config.js

	"reply":{
		"谁是大帅比":"当然是venfiw",
		"代购":"当前代购折扣为:8折,需要7天以上Steam好友,请用QQ联系我, 554515860",
		"hello":"hi"
}

when some send hello in chat, ur bot will send hi

or u can use if (message.indexOf(msg_him) >= 0)

when some send hello*** in chat, ur bot will send hi

Edited by venfiw
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...