Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

Review offers#361

Merged
Nicklason merged 26 commits intodevelopmentfrom
review-offers
Apr 12, 2020
Merged

Review offers#361
Nicklason merged 26 commits intodevelopmentfrom
review-offers

Conversation

@Nicklason
Copy link
Copy Markdown
Owner

Resolves: #174

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 5, 2020

I've tried it, so far so good.
Suggestions:

  1. Send notification to the trade partner that his/her trade is pending for review by the owner so that he/she knows that they need to wait.
  2. It might be nice if GIFT also can be reviewed.
  3. Send notification to ADMINS if there is any trade that needs to be reviewed? maybe like every # hours?

review1
review2

Thanks.

@Nicklason
Copy link
Copy Markdown
Owner Author

I've tried it, so far so good.
Suggestions:

  1. Send notification to the trade partner that his/her trade is pending for review by the owner so that he/she knows that they need to wait.
  2. It might be nice if GIFT also can be reviewed.
  3. Send notification to ADMINS if there is any trade that needs to be reviewed? maybe like every # hours?

review1
review2

Thanks.

Already made an issue for notifying #362

@Nicklason
Copy link
Copy Markdown
Owner Author

Gifts won't be reviewed because it has a setting for accepting gifts. But I did make review for escrow offers because you might want to accept them anyway.

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 5, 2020

Already made an issue for notifying #362

Yeah, it should be implemented (for me... need to wait for others review).

Gifts won't be reviewed because it has a setting for accepting gifts. But I did make review for escrow offers because you might want to accept them anyway.

I see... then "ALLOW_ESCROW" in .env and ecosystem.json should be set true?

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 6, 2020

@Nicklason, I think it's best to check for bans/escrow before skipping the trade offer for review because of OVERSTOCKED/INVALID_ITEM/INVALID_VALUE case.
escrow
escrow2

@Nicklason
Copy link
Copy Markdown
Owner Author

@Nicklason, I think it's best to check for bans/escrow before skipping the trade offer for review because of OVERSTOCKED/INVALID_ITEM/INVALID_VALUE case.
escrow
escrow2

very nice that you spotted that, maybe just have the bot check for escrow and bans when it first receives the offer, if it will be in escrow then just decline it instead of skipping it

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 6, 2020

Yes, agree with that, unless the user sets "ALLOW_ESCROW" is true, then it will skip to review an escrow offer.

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 7, 2020

I don't think this is overstocked. I've set the intent for all craft weapons to bank with max=100, and the other things (like craft hats/tools) to sell with max=10 (which perhaps if someone bought some weapon from the bot, they also give some sweets or extras and the bot will accept it.)

Is it if we set intent=sell, the bot does not want the items to be in the bot's inventory, even though the bot does not have a single one of it?

overstock
overstock2

@Nicklason Nicklason linked an issue Mar 9, 2020 that may be closed by this pull request
@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Mar 10, 2020

very nice that you spotted that, maybe just have the bot check for escrow and bans when it first receives the offer, if it will be in escrow then just decline it instead of skipping it

Will this do it?
commit

@idinium96
Copy link
Copy Markdown
Collaborator

will this be implemented soon to the master @Nicklason?

@idinium96
Copy link
Copy Markdown
Collaborator

Maybe if add some feature like add parameter all=true in !accepttrade or !declinetrade command.
tradess

Copy link
Copy Markdown
Collaborator

@idinium96 idinium96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after 5dd49f3
meta

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Apr 10, 2020

Here I have all possible cases for multiple reasons:

The only item in pricelist is:
Battle-Worn Robot Money Furnace, with
min=0,
max=1
buy.metal=0.55
sell.metal=1

  1. INVALID_ITEMS (our side)
    Invalid-item-our-side

  2. INVALID_ITEMS (their side - partner offers correct value + item that is not in pricelist)
    Invalid-item-their-side

  3. INVALID_VALUE (our side)
    invalid-value-our-side

  4. INVALID_VALUE (their side)
    invalid-value-their-side

  5. OVERSTOCKED (when partner offers an overstocked item with correct value)
    overstocked-our-side

  6. INVALID_ITEMS, INVALID_ITEMS (if partner want to offer and take items that are not in pricelist - both side)
    invalid-item-invalid-item-both-side

  7. INVALID_ITEMS, INVALID_VALUE (their side)
    invalid-items-invalid-value-their-side

  8. INVALID_ITEMS, INVALID_VALUE (our side)
    invalid-items-invalid-value-our-side

  9. OVERSTOCKED, INVALID_VALUE (when partner offers an overstocked item and taking an incorrect value)
    overstocked-invalid-value

  10. INVALID_ITEMS, OVERSTOCKED, INVALID_VALUE (when partner offers an overstocked item and taking an incorrect value and an item that is not in pricelist)
    invalid-items-overstocked-invalid-value

  11. INVALID_ITEMS, OVERSTOCKED, INVALID_ITEMS, INVALID_VALUE (when partner offers an overstocked item and an item that is not in pricelist and taking an incorrect value and item that is not in pricelist)
    invalid-items-overstocked-invalid-items-invalid-value

  12. INVALID_ITEMS, INVALID_ITEMS, INVALID_VALUE (this might not happen. The trade partner is offering and taking the same item with both sides having an item that is not in pricelist)
    invalid-items-invalid-items-invalid-value

@idinium96
Copy link
Copy Markdown
Collaborator

idinium96 commented Apr 10, 2020

This might worth mentioning here, that item overpay is still marked as OVERSTOCKED.
I add Reinforced Robot Bomb Stabilizer with intent=sell, min=0 and max=1, and this item is still not in the bot's inventory.
item-overpay-intent-sell-marked-overstockted

It only accepts if the item is set intent=bank:
item-overpay-intent-bank-accepted

#380

@Dex-Mori
Copy link
Copy Markdown

Dex-Mori commented Apr 10, 2020

Got an error when sending !trades command
19;09;36 - 10 04 2020
Shutdown > Restart

Again got this error

@Nicklason Nicklason merged commit bdfb9ee into development Apr 12, 2020
@Nicklason Nicklason deleted the review-offers branch April 12, 2020 14:57
Nicklason added a commit that referenced this pull request Apr 12, 2020
* src: fix problem with detecting killstreak

Fixes: #386

* src: fix problem with checking escrow

Fixes: #374

* add recorded trades time from first trade made in !trades command (#382)

* add recorded trades time from first trade made

* bring the trade records to the top

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* src: fix trades command

* src: pluralize item names

* Add admins to friendsToKeep (#407)

* fix typo and add missing variables found in schema (#408)

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* src: use getAdmins function for friendsToKeep

* src: use amount that the bot can trade when pluralizing

* Add option to clear pricelist (#411)

* src: add all option to remove command

* change confirm setting

* src: fix problem checking errors when sending offer

* update modules

* src: fix problem with queue freezing (#412)

Fixes #396

* src: add message command (#395)

* src: add message command

* follow eslint

* check if messages are enabled for user too

* check once

Co-authored-by: menoob003 <44436740+menoob003@users.noreply.github.com>

* change a few things about the message command

* fix problem with enabling messages

* rename env var

* add env var to templates

* i am a goof

* i am a goof 2

* i am a goof 3

* i am a goof 4

* i am goof 5?

* it is now very nice

* Review offers (#361)

* src: add command checks

* src: implement trades command for manual review

* src: change description for trades command

* src: remove unused argument

* src: add functionality for review of offers

If review is enabled then the bot won't decline
- invalid items
- overstocked
- invalid value

* src: manually accept / decline offers

* forgot to uncomment admin check

* src: fix offer logging

* src: notify about offers that are pending for review

* src: fix problem with no action from onNewTradeOffer handler

* src: always notify reviews to admins

* src: always decline escrow

* src: add metadata to offer action

* add missing arguments

* src: find all offer reasons

* add missing join

* fix problem with polldata compatibility

* check for escrow before marking the offer for review

* add error message to accept / decline trade commands

* add missing argument

* fix problem with not applying action to offer

* i am a goof

* always message admins when offer is pending for review

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* always display offer values in metal (#415)

* disable reviews by default

Co-authored-by: IdiNium <47635037+idinium96@users.noreply.github.com>
Co-authored-by: idinium96 <idinium96@users.noreply.github.com>
Co-authored-by: Mohammad Abdullah <49647622+mabdu11ah@users.noreply.github.com>
Co-authored-by: Zeckatz <44436740+Zeckatz@users.noreply.github.com>
Co-authored-by: menoob003 <44436740+menoob003@users.noreply.github.com>
Nicklason added a commit that referenced this pull request May 7, 2021
* src: fix problem with detecting killstreak

Fixes: #386

* src: fix problem with checking escrow

Fixes: #374

* add recorded trades time from first trade made in !trades command (#382)

* add recorded trades time from first trade made

* bring the trade records to the top

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* src: fix trades command

* src: pluralize item names

* Add admins to friendsToKeep (#407)

* fix typo and add missing variables found in schema (#408)

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* src: use getAdmins function for friendsToKeep

* src: use amount that the bot can trade when pluralizing

* Add option to clear pricelist (#411)

* src: add all option to remove command

* change confirm setting

* src: fix problem checking errors when sending offer

* update modules

* src: fix problem with queue freezing (#412)

Fixes #396

* src: add message command (#395)

* src: add message command

* follow eslint

* check if messages are enabled for user too

* check once

Co-authored-by: menoob003 <44436740+menoob003@users.noreply.github.com>

* change a few things about the message command

* fix problem with enabling messages

* rename env var

* add env var to templates

* i am a goof

* i am a goof 2

* i am a goof 3

* i am a goof 4

* i am goof 5?

* it is now very nice

* Review offers (#361)

* src: add command checks

* src: implement trades command for manual review

* src: change description for trades command

* src: remove unused argument

* src: add functionality for review of offers

If review is enabled then the bot won't decline
- invalid items
- overstocked
- invalid value

* src: manually accept / decline offers

* forgot to uncomment admin check

* src: fix offer logging

* src: notify about offers that are pending for review

* src: fix problem with no action from onNewTradeOffer handler

* src: always notify reviews to admins

* src: always decline escrow

* src: add metadata to offer action

* add missing arguments

* src: find all offer reasons

* add missing join

* fix problem with polldata compatibility

* check for escrow before marking the offer for review

* add error message to accept / decline trade commands

* add missing argument

* fix problem with not applying action to offer

* i am a goof

* always message admins when offer is pending for review

Co-authored-by: idinium96 <idinium96@users.noreply.github.com>

* always display offer values in metal (#415)

* disable reviews by default

Co-authored-by: IdiNium <47635037+idinium96@users.noreply.github.com>
Co-authored-by: idinium96 <idinium96@users.noreply.github.com>
Co-authored-by: Mohammad Abdullah <49647622+mabdu11ah@users.noreply.github.com>
Co-authored-by: Zeckatz <44436740+Zeckatz@users.noreply.github.com>
Co-authored-by: menoob003 <44436740+menoob003@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notify trade partner the action and reason when the offer has been handled Option to allow manual check for item overpay Manually review offers

3 participants