{"id":18718731,"url":"https://github.com/eggheadio/eggo-discord-bot","last_synced_at":"2025-04-12T14:07:22.482Z","repository":{"id":42011922,"uuid":"267377395","full_name":"eggheadio/eggo-discord-bot","owner":"eggheadio","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-18T16:35:45.000Z","size":65,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T08:47:30.310Z","etag":null,"topics":["bot","discord","egghead-discord","reaction-roles"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eggheadio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-27T16:58:18.000Z","updated_at":"2023-06-06T00:17:43.000Z","dependencies_parsed_at":"2022-08-12T02:20:38.144Z","dependency_job_id":null,"html_url":"https://github.com/eggheadio/eggo-discord-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggheadio%2Feggo-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggheadio%2Feggo-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggheadio%2Feggo-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eggheadio%2Feggo-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eggheadio","download_url":"https://codeload.github.com/eggheadio/eggo-discord-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578865,"owners_count":21127713,"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":["bot","discord","egghead-discord","reaction-roles"],"created_at":"2024-11-07T13:22:48.949Z","updated_at":"2025-04-12T14:07:22.447Z","avatar_url":"https://github.com/eggheadio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bot for egghead Discord\n\nThis is a bot for egghead's Discord.\n\nIt utilizes `discord.js` and runs on Node.js. \n\nThe bot is deployed on Heroku.\n\nFor local development you will need to set a `BOT_TOKEN` in a `.env` file. A template is provided.\n\n## Reaction Roles\n\nThis bot allows the configuration of **reaction roles**. This means that we can pre-define a message and if a user clicks a particular reaction they are assigned a role. This is useful for a Code of Conduct for new members as a way of \"signing\" that they have read and understand the CoC.\n\nThe `config.json` file is used to configure the reaction roles:\n\n```json\n[\n  {\n    \"message\": \"715018713383829625\",\n    \"channel\": \"715004775300726825\",\n    \"disjoint\": false,\n    \"reactions\": [\n      {\n        \"emoji\": \"🤔\",\n        \"roles\": [\"715015248742187058\"]\n      }\n    ]\n  }\n]\n```\n\nFinding the IDs you need is a lot easier if you turn on developer mode in Discord which can be found in your user settings.\n\nOne thing to note is that if a message already exists it needs to be loaded by the bot explicitly. The bot is only implicitly aware of new messages that come in while the bot is running. Existing messages must be retrieved from the cache for this to function as expected.\n\n## Resources\n\n[v11 -\u003e v12 changes](https://discordjs.guide/additional-info/changes-in-v12.html) were a significant issue making this bot function as they had major API changes between these versions.\n\n[discord.js event cheatsheet](https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584) is useful for seeing all the events in one place\n\n[discord-js-bot-guide](https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/SUMMARY.md)\n\n[Discord-EmojiToRole](https://github.com/NKN1396/Discord-EmojiToRole) had a lot of initial code that was clipped to get this running. It wasn't written for v12, but logically it is pretty solid.\n\n[Deploy your bot to Heroku](https://shiffman.net/a2z/bot-heroku/) Daniel Shiffman has an awesome tutorial","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggheadio%2Feggo-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feggheadio%2Feggo-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feggheadio%2Feggo-discord-bot/lists"}