Skip to content

Commit

Permalink
change the newly added variables name
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jul 18, 2020
1 parent b87850c commit dfd625a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ Time will be use in "!time" command and
- `DISABLE_REVIEW_OFFER_NOTE`: [true|false] - If set to false, it will show note on [each error](https://github.com/idinium96/tf2autobot/blob/master/src/classes/MyHandler.ts#L1140-L1264)
- `DISABLE_SHOW_CURRENT_TIME`: [true|false] - If set to false, it will show owner time on offer review notification that trade partner will received.

- `ACCEPT_INVALID_ITEMS_OVERPAY`: [true|false] - Default: false. Set to true if you want your bot to accept a trade with INVALID_ITEMS but with their value more or equal to our value.
- `ACCEPT_OVERSTOCKED_OVERPAY`: [true|false] - Default: false. Set to true if you want your bot to accept a trade with OVERSTOCKED but with their value more or equal to our value.
- `DISABLE_ACCEPT_INVALID_ITEMS_OVERPAY`: [true|false] - Default: false. Set to true if you want your bot to accept a trade with INVALID_ITEMS but with their value more or equal to our value.
- `DISABLE_ACCEPT_OVERSTOCKED_OVERPAY`: [true|false] - Default: false. Set to true if you want your bot to accept a trade with OVERSTOCKED but with their value more or equal to our value.
- `DISABLE_AUTOMATIC_DECLINE_ONLY_INVALID_VALUE`: [true|false]: Default: false. Set to true if you want to automatically decline trade with **ONLY** `INVALID_VALUE` and did not match the exception sku(s) and exception value.

- `INVALID_VALUE_EXCEPTION_SKUS` [StringArray] - An array of sku that will skip Invalid value if the difference between our and their value is not more than exception value in ref. Let say you want to trade an unusual, but then someone sent an offer with 0.11 ref less, but you want your bot to accept it anyway if it's less than 10 ref, so the trade will be accepted. By default, it will check only for any unusual and australium: `[";5;u", ";11;australium"]`, you can also leave it empty (`[""]`) so all with invalid value will be notified.
Expand Down
6 changes: 4 additions & 2 deletions src/classes/MyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,10 @@ export = class MyHandler extends Handler {
// }

if (
((uniqueReasons.includes('🟨INVALID_ITEMS') && process.env.ACCEPT_INVALID_ITEMS_OVERPAY === 'true') ||
(uniqueReasons.includes('🟦OVERSTOCKED') && process.env.ACCEPT_OVERSTOCKED_OVERPAY === 'true')) &&
((uniqueReasons.includes('🟨INVALID_ITEMS') &&
process.env.DISABLE_ACCEPT_INVALID_ITEMS_OVERPAY !== 'true') ||
(uniqueReasons.includes('🟦OVERSTOCKED') &&
process.env.DISABLE_ACCEPT_OVERSTOCKED_OVERPAY !== 'true')) &&
!(
uniqueReasons.includes('🟥INVALID_VALUE') ||
uniqueReasons.includes('🟫DUPED_ITEMS') ||
Expand Down
4 changes: 2 additions & 2 deletions template.ecosystem.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
"DISABLE_REVIEW_OFFER_NOTE": false,
"DISABLE_SHOW_CURRENT_TIME": false,

"ACCEPT_INVALID_ITEMS_OVERPAY": false,
"ACCEPT_OVERSTOCKED_OVERPAY": false,
"DISABLE_ACCEPT_INVALID_ITEMS_OVERPAY": false,
"DISABLE_ACCEPT_OVERSTOCKED_OVERPAY": false,
"DISABLE_AUTOMATIC_DECLINE_ONLY_INVALID_VALUE": true,

"INVALID_VALUE_EXCEPTION_SKUS": [";5;u", ";11;australium"],
Expand Down
4 changes: 2 additions & 2 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ DISABLE_SHOW_REVIEW_OFFER_SUMMARY=false
DISABLE_REVIEW_OFFER_NOTE=false
DISABLE_SHOW_CURRENT_TIME=false

ACCEPT_INVALID_ITEMS_OVERPAY=false
ACCEPT_OVERSTOCKED_OVERPAY=false
DISABLE_ACCEPT_INVALID_ITEMS_OVERPAY=false
DISABLE_ACCEPT_OVERSTOCKED_OVERPAY=false
DISABLE_AUTOMATIC_DECLINE_ONLY_INVALID_VALUE=true

INVALID_VALUE_EXCEPTION_SKUS=[";5;u", ";11;australium"]
Expand Down

0 comments on commit dfd625a

Please sign in to comment.