dsgriffin / opensea-sales-x-bot

An X bot that tweets Opensea sales for a given collection 🐳
ISC License
194 stars 290 forks source link

Why I am getting this error #15

Closed LoveBitcoinCash closed 3 years ago

LoveBitcoinCash commented 3 years ago

2021-11-24T10:24:07.827195+00:00 app[worker.1]: [Symbol(kCapture)]: false, 2021-11-24T10:24:07.827195+00:00 app[worker.1]: [Symbol(kNeedDrain)]: false, 2021-11-24T10:24:07.827195+00:00 app[worker.1]: [Symbol(corked)]: 0, 2021-11-24T10:24:07.827196+00:00 app[worker.1]: [Symbol(kOutHeaders)]: [Object: null prototype] 2021-11-24T10:24:07.827196+00:00 app[worker.1]: }, 2021-11-24T10:24:07.827196+00:00 app[worker.1]: data: 'error code: 1020' 2021-11-24T10:24:07.827196+00:00 app[worker.1]: }, 2021-11-24T10:24:07.827196+00:00 app[worker.1]: isAxiosError: true, 2021-11-24T10:24:07.827197+00:00 app[worker.1]: toJSON: [Function: toJSON] 2021-11-24T10:24:07.827197+00:00 app[worker.1]: }

dsgriffin commented 3 years ago

An OpenSea API key is a requirement as of this week, see the latest source code + README

LoveBitcoinCash commented 3 years ago

I did acquire the API key and put it on Heroku
apis

dsgriffin commented 3 years ago

Make sure you have the latest code changes - check the call to OpenSea in app.js and make sure you have the "headers" bit too

LoveBitcoinCash commented 3 years ago

I did everything correctly, I am still learning code and it's my first project.

https://github.com/LoveBitcoinCash/opensea-sales-twitter-bot

I will be glad if you have a look

dsgriffin commented 3 years ago

your OPENSEA_COLLECTION_SLUG looks wrong, it shouldn't have spaces, whatever is in the URL when you go to the collection is the slug e.g. mutant-ape-yacht-club

LoveBitcoinCash commented 3 years ago

Hi,

Thank you, I just corrected it. Look like now it's running fine.

State changed from starting to up 2021-11-24T11:29:49.240501+00:00 app[worker.1]: Last sale (in seconds since Unix epoch): undefined 2021-11-24T11:29:49.372168+00:00 app[worker.1]: 0 sales since the last one...

LoveBitcoinCash commented 3 years ago

Just one more thing. It's tweeted successfully but I want the format to more detailed then this.

null bought for 5.2398Ξ ($22465.64) #NFT

How to change it, I want asset name instead of 'null'.

dsgriffin commented 3 years ago

most collections have asset names but it looks like that one doesn't. you could use the token_id i guess

const assetName = _.get(event, ['asset', 'token_id'], _.get(event, ['asset_bundle', 'token_id']));
LoveBitcoinCash commented 3 years ago

That's worked thank you. Just a little help is needed again.

I want to add the word 'Mutant' at the start in every tweet. I tried to insert it but it's not working.

const tweetText = Mutant ${assetName} bought for ${formattedEthPrice}${ethers.constants.EtherSymbol} ($${Number(formattedUsdPrice).toFixed(2)}) #NFT ${openseaLink};