jwparsons / MeatCoin

2 stars 1 forks source link

Flesh coin dev #17

Open wstathis opened 4 years ago

wstathis commented 4 years ago

the meatMarket is open babyyy

jwparsons commented 4 years ago

You gotta clarify what the fuck this is

jwparsons commented 4 years ago

+420 −11 😏

wstathis commented 4 years ago

No changes to base functionality. Added !post, !market, and !market rules


!post <buy/sell/adjust> <price> <amt MC>
    Creates a buy/sell post on the meatMarket with the provided values, or adjusts your current post.
    Users cannot have multiple posts, and there is a xaction fee of %7 for adjustments.
!market
    displays all of the current postings
!market rules
    basically just says what I put under !post above
wstathis commented 4 years ago

also how does your CI work, seems like it just always fails npm

jwparsons commented 4 years ago

also how does your CI work

It doesn't yet. I think we need to add a test file which exercises certain functionality. You're welcome to take a crack at it.

jwparsons commented 4 years ago

No changes to base functionality. Added !post, !market, and !market rules

    Creates a buy/sell post on the meatMarket with the provided values, or adjusts your current post.
    Users cannot have multiple posts, and there is a xaction fee of %7 for adjustments.
!market
    displays all of the current postings
!market rules
    basically just says what I put under !post above```

Does this mean you can only buy and sell with other people?

wstathis commented 4 years ago

Need to change DMs to users to use name instead of ID or just remove altogether

wstathis commented 4 years ago

fix name padding - moot if we make anon


SELLERS-----------+------------QUANTITY+---------PRICE+
Sabrina the Teenage Lich|                 1.8|           1.1|
wstathis commented 4 years ago

Price matching function currently only adds to volume.bought, needs to write to volume.sold too just adding volume.traded

wstathis commented 4 years ago

Need to handle when two posts match 2:1 buyer:seller or vice versa, currently causes crash


TypeError: negPrice.toFixed is not a function
    at C:\Users\NigelThornburry\MeatCoin\index.js:1240:129
    at Array.forEach (<anonymous>)
    at C:\Users\NigelThornburry\MeatCoin\index.js:1190:38
    at Array.forEach (<anonymous>)
    at processMarket (C:\Users\NigelThornburry\MeatCoin\index.js:1187:29)
    at post (C:\Users\NigelThornburry\MeatCoin\index.js:1179:5)
    at Client.<anonymous> (C:\Users\NigelThornburry\MeatCoin\index.js:122:13)
    at Client.emit (events.js:311:20)
    at MessageCreateAction.handle (C:\Users\NigelThornburry\MeatCoin\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\NigelThornburry\MeatCoin\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)