-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ an option to only update buying price if an item is in stock #337
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
idinium96
requested review from
arik123,
Bonfire,
Dex-Spirit,
joekiller,
lexidor,
PieDimension,
rennokki,
rocanruca and
SkiLEXx
March 2, 2021 00:20
merging... |
Merged
idinium96
added a commit
that referenced
this pull request
Mar 3, 2021
#373 ## Added - Options.json related: - ✨option to disable sending the pre-accepted message - @idinium96 - new option added: `offerReceived.sendPreAcceptMessage.enable` (default is `true`) - ✨option to only show price update that is in stock - @idinium96 - new option added: `discordWebhook.priceUpdate.showOnlyInStock` (default is `false`) - ✨an option to partially update item prices if in stock and the difference between the new selling price and current buying price is negative (#284 - read: #337) - @idinium96 - ✨ option to select highValue spells - @idinium96 - new option added: `highValue.spells` (default is `[]` - all spells) - Others: - ✨Docker build for node images (refer: [Wiki](https://github.com/TF2Autobot/tf2autobot/wiki/Running-the-bot-using-docker)) - @rennokki - ✨support **buy order** for skins/war paints (Festivized skins/war paints not supported - see [`#337`](#377)) - @idinium96 - ✨option to disable socket entirely (read: #383) - @idinium96 ## Changed/updated - 🔄 replaced bracket with a dash to not combine with generated URL on retrying to accept offer message sent to admins via Steam Chat - @idinium96 - 🤝 custom-pricer friendly (#363) - @idinium96 - 📝 log bot uptime on auto-restart - @idinium96 - 🔑 ensure selling price for Mann Co. Supply Crate Key never be zero - @idinium96 - 🔄 updated dependencies - @idinium96 - 🔄 improve `!deposit` command (#325, #326) - @idinium96 - 🔄 more flexibility when adding items with parameters - @idinium96 - 🔄 refactor `!find` command (view what changed: #387) - @idinium96 - ✅ do not hold items in an offer for review - @idinium96 - ⏮ revert only pick 1 craft weapon when constructing an offer - @idinium96 ## Fixed - 🔨 wrong position for pure stock and total items in the Offer review send as Discord Webhook. - `!autoadd` command: - 🐛 fix the glitch where the pure got deleted from items dictionary - @idinium96 - ⌚ add a delay before sending `autoadd` summary - @idinium96 - 🔨 fix generic unusual buy order (ensure the generic match is used against 'their' inventory) (#340) - @joekiller - 🔨 fix sending duplicated trade summary - @idinium96 - 🔨 fix failed to disable Autokeys error - @idinium96 - 🐛 fix bot crashed (rare) on startup - @idinium96 - ⛔ do not execute sending price update to Discord Webhook if globalKeyPrices still undefined
Merged
idinium96
added a commit
that referenced
this pull request
Mar 6, 2021
#411 ## Added - Mainly if you're using generic Unusual buy order feature: - ✨option to not automatically add bought Unusual item to the pricelist (usual because buying with Generic Unusual buy order - #412, [Wiki](https://github.com/TF2Autobot/tf2autobot/wiki/Configure-your-options.json-file#--automatic-add-invalid-unusual--)) - @joekiller - new options added: - `pricelist.autoAddInvalidUnusual.enable` (default is `false`) - `sendAlert.receivedUnusualNotInPricelist` (default if `true`) - ✨HTTP API health check (and others in the future - #413, [Wiki](https://github.com/TF2Autobot/tf2autobot/wiki/Configuring-the-bot#api)) - @rennokki - new env variables: - `ENABLE_HTTP_API` (default is `false`) - `HTTP_API_PORT` (default is `3001`) - ✨option to show proper item name in trade/offer summary (with "The", no short - #415, [Wiki](https://github.com/TF2Autobot/tf2autobot/wiki/Configure-your-options.json-file#-trade-summary-settings-)) - @idinium96 - new options added: - `tradeSummary.showProperName` (default is `false`) ## Updates - Partial price update feature (updated #337): - ⛔ do not partial price Mann Co. Supply Crate Key (#407) - @idinium96 - ✅ add an option to exclude items for partial price update (#408, [Wiki](https://github.com/TF2Autobot/tf2autobot/wiki/Configure-your-options.json-file#--partial-price-update--)) - @idinium96 - new options.json property: `pricelist.partialPriceUpdate.excludeSKU` (default is `[]`) - 💅 include name in partial price update summary (#409) - @idinium96 - ⛔ do not perform usual update if grouped (#410) - @idinium96 - 🔨 refactor Bot.ts (#399) - @arik123 - 🔎🔑 keyPrices verification (2) and 🔨 small refactor on Pricelist.ts (#416) - @idinium96 - 🔕 ignore some error on fail action or to accept mobile confirmation (#419) - @idinium96 - 🔨 refactor: use Map and Set (#420) - @idinium96 - 🎨 show amount offering/offered/taking/taken in overstocked/understocked review/trade summary (#421) - @idinium96
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes Better Pricing #284
not implement: Safe guard should be added here: if buying price = selling price of other bot users (simple bp.tf check) then buying price - 0.11 ref = new buying price. But the selling price stays the same with the market (other bots).
new options.json properties:
pricelist.partialPriceUpdate.enable
(default isfalse
)pricelist.partialPriceUpdate.thresholdInSeconds
(default is604800
seconds or 7 days.)sendAlert.partialPrice.onUpdate
(default istrue
)sendAlert.partialPrice.onSuccessUpdatePartialPriced
(default istrue
)sendAlert.partialPrice.onFailedUpdatePartialPriced
(default istrue
)How does this work?
Code
tf2autobot/src/classes/Pricelist.ts
Lines 916 to 1021 in b2c6102
Explanation
(1)
ifpricelist.partialPriceUpdate.enable
is set totrue
AND that particular item is currently in stock (> 0) AND difference in time is less than the threshold AND not include excluded items (default only Mann Co. Supply Crate Key),(1.1)
if newSelling - currentBuying < 0 OR item group is "isPartialPriced";(1.1.1)
if it's determined that the new buying price (prices.tf/custom-autopricer) is less than the current selling price (in pricelist entry), then update ONLY the buying price of that item.(1.1.1.1)
then if it's also determined that the new selling price (prices.tf/custom-autopricer) is more than the current selling price (in pricelist entry), then update the selling price of that item too.(1.1.2)
else if1.1.1
false, check if, the new selling price (prices.tf/custom-autopricer) is more than the current selling price (in pricelist entry), then update the selling price of that item.(1.2)
else if1.1
false, update as usual (meaning the new selling price is higher and/or we did not partially price the item before).(2)
Else, update as usual (disabled and/or not in stock and/or difference in time is more than threshold and/or any of the excluded item (sku).The above conditions also applied when the bot starts/restart (
updateOldPrices
method).