{"id":23132272,"url":"https://github.com/joseferben/whywouldyoubot","last_synced_at":"2025-06-25T16:07:27.992Z","repository":{"id":37300321,"uuid":"482032550","full_name":"joseferben/whywouldyoubot","owner":"joseferben","description":"An MMO where players write their bots in TypeScript.","archived":false,"fork":false,"pushed_at":"2023-07-26T08:40:54.000Z","size":3899,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-11T06:37:57.726Z","etag":null,"topics":["mmorpg","react","remix-run","sqlite","typescript"],"latest_commit_sha":null,"homepage":"https://www.whywouldyoubot.gg","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joseferben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-15T17:20:00.000Z","updated_at":"2024-04-21T12:21:03.000Z","dependencies_parsed_at":"2023-01-31T22:00:31.540Z","dependency_job_id":null,"html_url":"https://github.com/joseferben/whywouldyoubot","commit_stats":null,"previous_names":["joseferben/whywouldyoubot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseferben%2Fwhywouldyoubot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseferben%2Fwhywouldyoubot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseferben%2Fwhywouldyoubot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joseferben%2Fwhywouldyoubot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joseferben","download_url":"https://codeload.github.com/joseferben/whywouldyoubot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230105975,"owners_count":18173971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mmorpg","react","remix-run","sqlite","typescript"],"created_at":"2024-12-17T11:18:25.510Z","updated_at":"2024-12-17T11:18:26.175Z","avatar_url":"https://github.com/joseferben.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Why Would You Bot?\n\nThis is an MMO where players can create their own bots to play the game alongside them. Think Old School RuneScape but bots are an official part of the game.\n\n## Your first bot\n\n1. Login at [whywouldyoubot.gg](https://www.whywouldyoubot.gg) using Discord\n\n2. Create a bot in-game and copy the API key\n\n![createbot.png](/docs/createbot.png)\n\n3. Install the SDK\n\n`npm install @wwyb/sdk`\n\n4. Create a file bot.js and implement `bot.act`` to control your bot\n\n```typescript\nimport { Bot } from \"@wwyb/sdk\";\n\nif (!process.env.API_KEY) throw new Error(\"API_KEY not set\");\n\nconst bot = new Bot({\n  apiKey: process.env.API_KEY,\n});\n\nbot.act(async (state) =\u003e {\n  const { x, y } = state.me;\n  const xRandom = Math.random() \u003e 0.5 ? 2 : -2;\n  const yRandom = Math.random() \u003e 0.5 ? 2 : -2;\n  const target = { x: x + xRandom, y: y + yRandom };\n  console.log(\"walking to\", target);\n  return bot.walkTo(target);\n});\n```\n\n5. Run your bot\n   `API_KEY=\u003cyour key\u003e node bot.js`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseferben%2Fwhywouldyoubot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoseferben%2Fwhywouldyoubot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoseferben%2Fwhywouldyoubot/lists"}