You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+23-5
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@
6
6
* development: new code which will hopefully end up in master.
7
7
* nodb: this bot instance doesn't use Mongo DB so it doesn't do price checking for lotteries.
8
8
* donation-only: this bot instance only accepts all donations and all kind of offers from bot's owner (doesn't use Mongo DB and doesn't do lotteries).
9
-
* donation-only-without-2FA: this bot instance only accepts donations (no item loss) and doesn't use Mobile AUth (doesn't use Mongo DB and doesn't do lotteries).
9
+
* donation-only-without-2FA: this bot instance only accepts donations (no item loss) and doesn't use Mobile Auth (doesn't use Mongo DB and doesn't do lotteries).
**_Steam Trading/CHAT BoT | Handles Trade Offers, Friends Invites and Group CHATs_**
14
14
15
15
The following is a list of functions that ZED provides at the moment:
16
16
@@ -23,6 +23,7 @@ The following is a list of functions that ZED provides at the moment:
23
23
* Chat messages check (logs to console when bot receives a chat message).
24
24
* Notifications check (logs to console if any new comment is available).
25
25
* Lottery: Send any 1 Trading Card, Background, Emoticon or Booster Pack to the BoT and it will send you back a random Item of the same type (card for card, emote for emote etc...).
26
+
* Group CHAT: Join the BoT to any Group CHAT manually or via config file and start using commands (WIP).
26
27
27
28
28
29
## Required software
@@ -36,6 +37,7 @@ The following is a list of functions that ZED provides at the moment:
36
37
* chalk
37
38
* console-stamp
38
39
* mongodb
40
+
* request
39
41
* steam-totp
40
42
* steam-tradeoffer-manager
41
43
* steam-user
@@ -51,7 +53,7 @@ Run `npm install` inside BoT's directory to install all dependencies.
51
53
52
54
`password`: bot's Steam Account Password
53
55
54
-
`sharedSecret`: You might be wondering where to find the shared/identity secret and there are actually many tutorials depending on your device [1]
56
+
`sharedSecret`: You might be wondering where to find the shared/identity secret and there are actually many tutorials depending on your device.[1]
55
57
56
58
`identitySecret`: Same as above.
57
59
@@ -63,6 +65,8 @@ Run `npm install` inside BoT's directory to install all dependencies.
63
65
64
66
`botSteamID3`: See Above
65
67
68
+
`ClanChatGroupID`: Your Group's ID64 to have the BoT automatically join it. [2]
69
+
66
70
`customGame`: This is Non-Steam Game Played by the BoT - Something like "Trash BoT - Accepting Junk" or whatever you want.
67
71
68
72
`lockedItems`: This is an array of Items you don't want to be traded by the BoT (maybe you're using them in your profile, like a background).
@@ -73,11 +77,16 @@ Run `npm install` inside BoT's directory to install all dependencies.
73
77
74
78
`syncInventoryWithDbOnStartup`: Update DB entries syncing them with bot's Inventory (you can also sync manually with Admin-Only "!sync" command).
75
79
76
-
`db "connectionString"`: This depends on your MongoDB Configuration - Something like this should work: "mongodb://localhost:27017/zed"
80
+
`openweathermapAPI`: Not mandatory but "!weather" command won't work without it. If you want to get one for free, visit: "https://openweathermap.org/api".
81
+
82
+
`steamAPI`: Not mandatory but "!tf2" command won't work without it. You can get yours for free by visiting "https://steamcommunity.com/dev/apikey".
83
+
84
+
`db "connectionString"`: This depends on your MongoDB Configuration - Something like this should work: "mongodb://localhost:27017/zed".
77
85
78
86
79
87
[1] Shared/Identity secrets must be extracted from your Two Factor Authenticator App, so it's always a different process depending on which device
80
88
you're actually using: iPhone - Android - 3rd Party Desktop App like WinAuth etc...
89
+
[2] You can check steamID of your group by navigating to its page, then adding /memberslistxml?xml=1 to the end of the link, so the link will look like this: "https://steamcommunity.com/groups/wrongditch/memberslistxml?xml=1". Then you can get steamID of your group from the result, it's in <groupID64> tag.
81
90
82
91
## Starting the BoT
83
92
@@ -91,4 +100,13 @@ you're actually using: iPhone - Android - 3rd Party Desktop App like WinAuth etc
91
100
92
101
### Admin-Only
93
102
94
-
`!sync`: Sync DB and Inventory Items manually.
103
+
`!sync`: Sync DB and Inventory Items manually.
104
+
105
+
## Group CHAT Commands
106
+
107
+
`!help` || `!commands`: You'll get a list of all commands.
108
+
109
+
### Featured Commands
110
+
111
+
`!weather <city> <unit of measure>`: Query "openweathermaps" to get weather info for chosen city in Metric or Imperial units.
112
+
`!tf2 <class>`: Get personal Team Fortress 2 Stats for chosen class.
zed.manager._steam.chat.sendChatMessage(groupID,chatID,"Hi there "+"[mention="+senderAccountID+"]@"+sender+"[/mention]"+"!"+" :steamhappy:");// [mention=accountid]@name[/mention]
233
+
}elseif(message==="!next"){
234
+
zed.manager._steam.chat.sendChatMessage(groupID,chatID,"Your satisfaction is our best prize. Next!");
235
+
}elseif(message==="!help"){
236
+
zed.manager._steam.chat.sendChatMessage(groupID,chatID,"I'm a trading and chat bot; if you want to trade with me, first read the info showcase on my profile. For a list of available commands, type '!commands' without the quotes. More at: https://github.com/roughnecks/ZED");
zed.manager._steam.chat.sendChatMessage(groupID,chatID,"Wrong or missing unit of measure.");
274
+
return;
275
+
}
276
+
277
+
request(url,function(err,response,body){
278
+
if(err){
279
+
console.log('error:',error);
280
+
}else{
281
+
letweather=JSON.parse(body);
282
+
if(weather.cod==404){
283
+
zed.manager._steam.chat.sendChatMessage(groupID,chatID,"City not found.");
284
+
return;
285
+
}elseif(weather.cod==200){
286
+
if(units==='METRIC'){
287
+
letresult=`It's ${weather.weather[0].description} and ${weather.main.temp} °C in ${weather.name}, ${weather.sys.country}! Pressure is ${weather.main.pressure} hPa, humidity is ${weather.main.humidity}% and wind speed is ${weather.wind.speed} meter/sec.`;
letresult=`It's ${weather.weather[0].description} and ${weather.main.temp} °F in ${weather.name}, ${weather.sys.country}! Pressure is ${weather.main.pressure} hPa, humidity is ${weather.main.humidity}% and wind speed is ${weather.wind.speed} miles/hour.`;
0 commit comments