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

Eliza social bot #281

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

supreme2580
Copy link
Contributor

  • issue #
  • follows contribution guide
  • code change includes tests
  • breaking change

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

Copy link

vercel bot commented Jan 18, 2025

@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
Copy link
Contributor

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:

This would prevent people from faking it, and it would be easier and more accurate to query the pixel count from postgres.

Copy link
Contributor Author

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


// Send milestone notification
_, err = http.Post(
"http://localhost:3001/Art%20Peace%20Achievement%20Bot/message",
Copy link
Contributor

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:

Copy link
Contributor Author

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'
Copy link
Contributor

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?

Copy link
Contributor Author

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🚀

@supreme2580
Copy link
Contributor Author

Removed commented out code and moved the bot url to config files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants