{"id":21346937,"url":"https://github.com/queer/amybot-shards","last_synced_at":"2026-07-04T01:31:35.251Z","repository":{"id":94882012,"uuid":"102465097","full_name":"queer/amybot-shards","owner":"queer","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-25T08:53:29.000Z","size":133,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T11:14:15.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"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/queer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T09:55:58.000Z","updated_at":"2018-08-21T21:27:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbf918a8-811f-4e8e-9bc2-6a076e8fc7c6","html_url":"https://github.com/queer/amybot-shards","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/queer/amybot-shards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Famybot-shards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Famybot-shards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Famybot-shards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Famybot-shards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/queer","download_url":"https://codeload.github.com/queer/amybot-shards/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Famybot-shards/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35107463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-22T02:12:05.526Z","updated_at":"2026-07-04T01:31:35.232Z","avatar_url":"https://github.com/queer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amybot shards\n\nThe magical thing that dumps Discord events into the backend. :tm:\n\n![Powered by Shreddo](https://img.shields.io/badge/Powered%20by-Shreddo-FF69B4.svg)\n\nMuch thanks to [Shredder121](https://github.com/shredder121) for yelling at me when I make dumb decisions, and for generally being awesome. \n\nDue to some needs of mine, this is also a Discord API library, of sorts. Eventually I'll be able to replace JDA, but not any time soon\n\n## Badges\n\n[![forthebadge](http://forthebadge.com/images/badges/uses-badges.svg)](http://forthebadge.com) \n[![forthebadge](http://forthebadge.com/images/badges/made-with-crayons.svg)](http://forthebadge.com)\n[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)\n[![forthebadge](http://forthebadge.com/images/badges/compatibility-pc-load-letter.svg)](http://forthebadge.com)\n[![forthebadge](http://forthebadge.com/images/badges/contains-technical-debt.svg)](http://forthebadge.com)\n[![forthebadge](http://forthebadge.com/images/badges/powered-by-electricity.svg)](http://forthebadge.com)\n\n\n## Current TODO list\n\n- Finish mechanisms for building caches out of Discord events\n- Make sure that snowflake ZSET caches are actually updated\n- Make sure that tests actually pass\n- Abstract out the messenger layer a bit better so that I can drop in RMQ support later\n\n## How is everything connected?\n\nThis simple graph should explain it all quite nicely\n\n![Graph](simple.svg)\n\nThe key takeaway here is that Graphviz is hard to do right. :thumbsup:\n\n## wtf is wrong with you\n\nWell JDA didn't support what I wanted, and external caching + raw mWS event access is nice. \n\n## Configuration\n\nConfiguration is done through environment variables.\n\n```bash\n# The token for your bot\nBOT_TOKEN=\"no default provided, obviously\"\n# Your redis host address. Default is 'redis'\nREDIS_HOST=\"redis\"\n# The password to your redis host. This is a requirement\nREDIS_PASS=\"a\"\n# How to derive shard id / scale. Default method is the Rancher metadata service, but may also be configured through environment variables\n# Possible values: \"rancher\", \"env\"\nSHARDING_METHOD=\"rancher\"\n# Used when SHARDING_METHOD=\"env\"\nSHARD_ID=15\n# Used when SHARDING_METHOD=\"env\"\nSHARD_SCALE=27\n```\n\n## Other\n\n### Some thoughts on caching\n\n- **Redisson is not used anymore.** While unfortunate, this decision was made because Redisson was just like \"lol what is serializing correctly :S\" and decided to blow it up using the Jackson codec. \n- All guilds have their own object in the cache\n- All users have their own object in the cache\n- All members lists are a part of their respective guild objects, as a set of Member objects\n- Member objects reference their user object by snowflake\n- Building initial caches is pretty heavily abusive to the redis server; make sure you're actually ready for this. \n\n### Caching format\n\n#### Single objects\n\nGuild: `guild:snowflake:bucket`\n\nUser: `user:snowflake:bucket`\n\nMember: `member:guild_snowflake:user_snowflake:bucket`\n\nChannel: `channel:snowflake:bucket`\n\nRole: `role:guild_snowflake:snowflake:bucket`\n\nEmote: `emote:guild_snowflake:snowflake:bucket`\n\n#### Snowflake sets\n\nUsers: `user:sset`\n\nGuilds: `guild:sset`\n\nMembers: `member:guild_snowflake:sset`?\n\nChannels: `channel:sset`\n\nRoles: `role:sset`\n\nEmotes: `emote:sset`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueer%2Famybot-shards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqueer%2Famybot-shards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueer%2Famybot-shards/lists"}