c# - Steamkit2 Message to specific user -
once adds bot in friendlist, bot accepting request , send message new "friend", want send message steamid well, reason isn't working
it accept , send message new friend, not send me message,
static void onfriendslist(steamfriends.friendslistcallback callback) { thread.sleep(2500); foreach(var friend in callback.friendlist) { if (friend.relationship == efriendrelationship.requestrecipient) { steamfriends.addfriend(friend.steamid); thread.sleep(500); steamfriends.sendchatmessage(friend.steamid, echatentrytype.chatmsg, "hello bot"); steamfriends.sendchatmessage(new steamid { value = "76561198145164176" }, echatentrytype.chatmsg, "a friend had added me!"); //this ain't working } } }
also getting syntax error @ value,
severity code description project file line error cs0117 'steamid' not contain definition 'value' tutorialbot c:\users\stagiair\documents\visual studio 2015\projects\tutorialbot\tutorialbot\program.cs 180
documentation: http://www.nudoq.org/#!/packages/steamkit2/steamkit2/steamfriends/m/sendchatmessage
based on message, "value" isn't field steamid object. looking @ steamid, looks item you're looking accountid.
based on constructors steamid, looks instead of:
steamfriends.sendchatmessage(new steamid { value = "76561198145164176" }, echatentrytype.chatmsg, "a friend had added me!");
you'll want use instead:
steamfriends.sendchatmessage(new steamid(76561198145164176), echatentrytype.chatmsg, "a friend had added me!");
Comments
Post a Comment