Skip to content

Commit

Permalink
add an option to not invite people to join groups
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jul 29, 2020
1 parent 6295c05 commit 0e7dce2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ You can run your bot without this first, which then on the first run, it will pr
- `DISABLE_SOMETHING_WRONG_ALERT`: [true|false] - Default: `false`. My custom - Used to notify owner if your bot has a queue problem/full inventory/low in pure (if Autokeys is on).
- `DISABLE_CRAFTWEAPON_AS_CURRENCY`: [true|false] - Default: `false`. Set it as `true` if you don't want to set craft weapons as currency (0.05 ref).
- `DISABLE_ADD_FRIENDS`: [true|false] - Default: `false`. Set to `true` if you don't want people to add your bot (not recommended).
- `DISABLE_GROUPS_INVITE`: [true|false] - Default: `false`. Set to `true` if you don't want your bot to invite people to join groups **(You still need to have at least 1 group ID in the `GROUPS` array)**.
- `DISABLE_CHECK_USES_DUELING_MINI_GAME`: [true|false] - Default: `false`. Set to `true` if you want your bot to buy Dueling Mini-Game of regardless of how many uses left.
- `DISABLE_CHECK_USES_NOISE_MAKER`: [true|false] - Default: `false`. Set to `true` if you want your bot to accept Noise Maker that is not 25 Uses.

Expand Down
4 changes: 4 additions & 0 deletions src/classes/MyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,10 @@ Autokeys status:-
}

private inviteToGroups(steamID: SteamID | string): void {
if (process.env.DISABLE_GROUPS_INVITE === 'true') {
// You still need to include the group ID in your env.
return;
}
this.bot.groups.inviteToGroups(steamID, this.groups);
}

Expand Down
3 changes: 3 additions & 0 deletions template-three-bots.ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down Expand Up @@ -190,6 +191,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down Expand Up @@ -336,6 +338,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down
2 changes: 2 additions & 0 deletions template-two-bots.ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down Expand Up @@ -190,6 +191,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down
1 change: 1 addition & 0 deletions template.ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"DISABLE_SOMETHING_WRONG_ALERT": false,
"DISABLE_CRAFTWEAPON_AS_CURRENCY": false,
"DISABLE_ADD_FRIENDS": false,
"DISABLE_GROUPS_INVITE": false,
"DISABLE_CHECK_USES_DUELING_MINI_GAME": false,
"DISABLE_CHECK_USES_NOISE_MAKER": false,

Expand Down
1 change: 1 addition & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ DISABLE_MESSAGES=false
DISABLE_SOMETHING_WRONG_ALERT=false
DISABLE_CRAFTWEAPON_AS_CURRENCY=false
DISABLE_ADD_FRIENDS=false
DISABLE_GROUPS_INVITE=false
DISABLE_CHECK_USES_DUELING_MINI_GAME=false
DISABLE_CHECK_USES_NOISE_MAKER=false

Expand Down

0 comments on commit 0e7dce2

Please sign in to comment.