-
Notifications
You must be signed in to change notification settings - Fork 51
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
Eliza social bot #281
base: main
Are you sure you want to change the base?
Eliza social bot #281
Conversation
@supreme2580 is attempting to deploy a commit to the keep-starknet-strange Team on Vercel. A member of the Team first needs to authorize it. |
@@ -399,6 +399,60 @@ const CanvasContainer = (props) => { | |||
} | |||
props.clearPixelSelection(); | |||
props.setLastPlacedTime(timestamp * 1000); | |||
|
|||
// Check world pixel count milestones after successful placement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think milestones should be checked on the FE, but on the BE while indexing. I think adding the logic somewhere around here would be best:
art-peace/backend/routes/indexer/worlds.go
Line 491 in dbd932d
This would prevent people from faking it, and it would be easier and more accurate to query the pixel count from postgres.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhh okay boss, will shift the logic there
backend/routes/indexer/worlds.go
Outdated
|
||
// Send milestone notification | ||
_, err = http.Post( | ||
"http://localhost:3001/Art%20Peace%20Achievement%20Bot/message", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to change this to a backend config, so it can change for local and cloud deployments.
An example:
- https://github.com/keep-starknet-strange/art-peace/blob/main/configs/backend.config.json
- https://github.com/keep-starknet-strange/art-peace/blob/main/configs/docker-backend.config.json
- https://github.com/keep-starknet-strange/art-peace/blob/main/configs/prod-backend.config.json
websocketHost := core.ArtPeaceBackend.BackendConfig.WsHost + ":" + strconv.Itoa(core.ArtPeaceBackend.BackendConfig.WsPort) + "/ws-msg"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay boss, on it
// { | ||
// method: 'POST', | ||
// headers: { | ||
// 'Content-Type': 'application/json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be cleaned up? I think all changes to the FE ( except for dockerfile patch ) aren't needed atm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah... will remove it🚀
Removed commented out code and moved the bot url to config files |
Implemented the Eliza framework to send pixel notifications on twitter, it sends twitter notifications for 1, 100, 1K, 10K, 50K, 100K, 1M, 10M, 100M, 1B, 10B, 100B, 1T pixel milestones.
To setup do the following
cd eliza
cp .env.example .env
Setup your ANTHROPIC API KEY, TWITTER_USERNAME, TWITTER_PASSWORD and TWITTER_EMAIL it should post via
nvm install 22
nvm use 22
pnpm i --f
pnpm rebuild
pnpm start
You can then test this out by running docker and creating a world then placing a pixel and checking your twitter after a few seconds