Skip to content
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

Add support for custom pricers throughout the application #363

Closed
Bonfire opened this issue Feb 22, 2021 · 0 comments · Fixed by #364 or #373
Closed

Add support for custom pricers throughout the application #363

Bonfire opened this issue Feb 22, 2021 · 0 comments · Fixed by #364 or #373
Labels
enhancement New feature or request

Comments

@Bonfire
Copy link
Member

Bonfire commented Feb 22, 2021

Is your feature request related to a problem? Please describe.
Currently, TF2Autobot displays one of two sources for its prices. These sources are "manual" or "prices.tf". These sources do not apply to custom auto-pricers.

Describe the feature you'd like
I propose a third price source, custom, to act as a differentiator for use in trade summaries, autokeys, and the like. The exact pricer or API is not required to be specified, simply custom is enough.

Describe alternatives you've considered
There are no alternatives to this enhancement that I could think of.

Got any bounty as a reward for anyone fulfills your request?
N/A

Additional context
Some examples in the code where "manual" or "prices.tf" need to be replaced to use "manual", "prices.tf" or "custom":

keyPrices.src === 'manual' ? 'manual' : 'prices.tf'

'!check (sku|name|defindex)=<a> - Request the current price for an item from Prices.TF',

` (${keyPrices.src === 'manual' ? 'manual' : 'prices.tf'})` +

? `\n${cTKeyRate} ${keyPrices.buy.metal.toString()}/${keyPrices.sell.metal.toString()} ref` +

This can be done in a way that specifies the current source globally. So the bot can easily refer to something such as pricingSource, and this would have either manual, prices.tf or custom so it can be easily referred to.

@Bonfire Bonfire added the enhancement New feature or request label Feb 22, 2021
@idinium96 idinium96 linked a pull request Feb 23, 2021 that will close this issue
idinium96 added a commit that referenced this issue Feb 23, 2021
- 🔄 replace bracket with just a dash to not confuse the generated URL (Steam Chat, on an error to accept an offer)
- 🔨 fix the wrong position (pure and inventory in Offer review - Discord Webhook)
- 🤝 custom-pricer friendly (#363)
@idinium96 idinium96 linked a pull request Feb 26, 2021 that will close this issue
idinium96 added a commit that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant