{"id":18484375,"url":"https://github.com/giveth/buddy-bot","last_synced_at":"2025-04-19T14:39:51.125Z","repository":{"id":194821329,"uuid":"691626438","full_name":"Giveth/buddy-bot","owner":"Giveth","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-03T19:41:17.000Z","size":83,"stargazers_count":10,"open_issues_count":7,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-08T20:02:04.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Giveth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-14T14:56:21.000Z","updated_at":"2024-12-03T19:41:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"fcd20edf-79ca-4289-a286-c7264110b1e5","html_url":"https://github.com/Giveth/buddy-bot","commit_stats":null,"previous_names":["giveth/buddy-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fbuddy-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fbuddy-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fbuddy-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fbuddy-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Giveth","download_url":"https://codeload.github.com/Giveth/buddy-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716125,"owners_count":21315062,"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":[],"created_at":"2024-11-06T12:39:30.474Z","updated_at":"2025-04-19T14:39:51.098Z","avatar_url":"https://github.com/Giveth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# buddy-bot\n\nThis Discord bot facilitates a buddy pairing system, allowing users to be paired up with buddies for calls and handling various administrative tasks within the buddy system.\n\n## Setup \u0026 Installation:\n\n### Local Setup:\n\n**Set up a discord bot first! See below how!**\n\n1. **Clone the Repository**:\n\n   ```bash\n   git clone https://github.com/Giveth/buddy-bot.git\n   cd buddy-bot\n   ```\n\n2. **Install Dependencies**:\n\n   ```bash\n   npm install\n   ```\n\n3. **Environment Variables**:\n   Copy `.env.template` to `.env` set all the needed values\n\n4. **Run the Bot with hot reloading**:\n   ```bash\n   npm run dev\n   ```\n\n### Discord Developer Portal Setup:\n\n1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).\n2. Click on the \"New Application\" button and give it a name.\n3. Navigate to the \"Bot\" tab on the left and click \"Add Bot\".\n4. Under the \"TOKEN\" section, click \"Copy\" to get your bot token. This is what you'll set as `DISCORD_TOKEN` in your `.env` file.\n5. Under the \"OAuth2\" tab, under \"OAuth2 URL Generator\", select the following scopes: `bot`.\n6. Under \"Bot Permissions\", select:\n\n   - `Send Messages`\n   - `Read Message History`\n   - `View Channels`\n   - `Manage Roles` (for role-based actions, use with caution)\n   - `Attach Files` (for audio transcription)\n\n7. Using the generated URL under \"OAuth2 URL Generator\", invite the bot to your server.\n\n## Admin commands:\n\n**Updating the Contributors Sheet**:\n  1. Admin users can type `!fillSheet` to update the contributors sheet with all people who possess the \"Contributor\" role.\n  2. `!pairUp` (ADMIN only) - Automate the creation of \"buddy pairings\" from a list of names and User IDs.\n\n*Pairing Contributors:*\n  ~~Admin users can type `!pairContributors` in any channel to initiate the **pairing process**.~~\n  Pairings are done **manually** for now.\n\n**Start the buddy review process**:\n- `!dmBuddy @Username` (ADMIN only) - Start the buddy feedback process for a **pair of user (contributor) and buddy**:\n  1. The contributor and buddy get a DM that its time for their buddy feedback call and the contributor is asked for the date and time. The state is set to `awaitingDate`.\n  1. Once the date and time are submitted to the buddy-bot via DM (by the contributor) the state is set to `date set` and the date is recorded in the google sheet.\n  1. A message is posted to the `ANNOUNCEMENT_CHANNEL` that a buddy call is about to happen and is asking the community for feedback.\n\n**After the buddy call**:\n- `!checkCalls` (ADMIN only) - Checks the backend sheet for Buddy calls that **happened at leaste 1 hour ago** with a **Status of \"date set\"**. For all pairs it can find this condition to be true, it will DM them and ask: **\"Did the buddy call happen?\"**. If the answer is yes, we change **Status to \"paired no date\", delete the Buddycalldate and save the current date in \"Lastcall\" (please note that this function *can* be triggered manually, but there is also a cron job calling this function every hour \n\n**Feedback form helpers**:\n- `!selfReview` (ADMIN only) - Check the backend sheet for buddy pairs with the state `date set` and send the \"self review form\" to them.\n- `!DMselfReview @Username1 @Username2` (ADMIN only) - Buddy Bot sends a DM to @Username1\u00262 and invites them to fill out the \"Self Review form\"\n- `!adminFeedback @Contributor @Username1 @Username2` (ADMIN only) - Buddy Bot sends a DM to @Username1\u00262 and invites them to fill out the \"feedback form\" **for** the **@Contributor**\n- `!leaderFeedback @Leader @Username1 @Username2` (ADMIN only) - Buddy Bot sends a DM to @Username1\u00262 and invites them to fill out the \"leader feedback form\" **for** the **@Leader**\n\n**Contributor commands**\n- `!getFeedback @Username1 @Username2` - Buddy Bot sends a DM to @Username1\u00262 and invites them to fill out the \"feedback form\"\n\n**CRON jobs**\n- **once a day**, buddy-bot will check the *Buddycalldate*-column for **calls scheduled for the following day**. If it discovers a call to be scheduled it will **send** the relevant *Doclink* to the respective buddy. A message is sent to *ANNOUNCEMENT_CHANNEL* detailing the buddy pair that got notified.\n- **every hour** buddy-bot will run the checkCalls() function to see if a buddy call took place within the last hour and then closing this buddy call round for the pair.\n\n### WIP\n\n- `!checkDates` (ADMIN only) - Check for calls that occurred over 10 weeks ago\n- `!checkCalls` (ADMIN only) - Check if any calls happened recently and if yes ask for the notes\n  ~~- `!askForNotes` - Send a DM asking for the buddy-call notes~~\n\n## The Pairing process\n\n~~- A cron job is packaged with the bot that will run `!pairContributors` automatically every quarter~~\n\n- Once the process has been started the _announcement channel_ will announce the pairings for this round and send a DM to every participant, requesting a date and time for their feedback call.\n- It is easier to send requests for Feedback and Self-Review now\n- Another cron job will check the sheet every ten minutes for buddy calls that already happened\n- One hour after a call, the contributors will get a DM asking them for their buddy feedback call **notes**\n- The notes get sent to the relevant person in HR\n\n## Docker Deployment:\n\n1. Build the Docker image:\n\n   ```bash\n   docker build -t your_bot_name .\n   ```\n\n2. Run the bot inside a Docker container:\n   ```bash\n   docker run -d --name your-bot-name --restart always your_image_name\n   ```\n\n## Permissions:\n\nEnsure the bot has permission to read roles, send messages, read messages, and access message attachments. If using role-based actions like updating roles or checking member roles, ensure that the bot's role is higher in the server's role hierarchy than the roles it's managing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fbuddy-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiveth%2Fbuddy-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fbuddy-bot/lists"}