{"id":20712909,"url":"https://github.com/thesis/bishop","last_synced_at":"2025-09-10T15:40:37.801Z","repository":{"id":64990247,"uuid":"580042169","full_name":"thesis/bishop","owner":"thesis","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-16T20:32:52.000Z","size":96,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-23T07:55:22.765Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesis.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":"2022-12-19T15:18:19.000Z","updated_at":"2023-02-09T21:33:35.000Z","dependencies_parsed_at":"2024-11-17T02:23:23.442Z","dependency_job_id":"fd7162ce-e121-43e9-8230-10a74aba344f","html_url":"https://github.com/thesis/bishop","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/thesis%2Fbishop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesis%2Fbishop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesis%2Fbishop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesis%2Fbishop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesis","download_url":"https://codeload.github.com/thesis/bishop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395201,"owners_count":21423376,"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-17T02:22:29.444Z","updated_at":"2025-04-23T07:55:27.835Z","avatar_url":"https://github.com/thesis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Low-dependency discord bot to create an opinionated experience at [Keep](https://keep.network/).\n\n### Architecture\nAdd scripts or event hooks to the `/scripts/` folder. These should export an\nobject with two keys:\n+ `trigger`, which is the\n  [Event](https://discord.js.org/#/docs/discord.js/main/typedef/Events) that\n  triggers the script.\n+ `execute`, which is a function that takes in a `client` and returns a event\n  handler function. For a barebones example of this, check out\n  [logged-in.js](https://github.com/thesis/bishop/blob/4757eab67b6751a361a8f09499cc97daf587e41f/scripts/logged-in.js).\n\nAdd cron jobs to the `/cron/` folder. These should export the following keys:\n+ `schedule`, which is a [cron-formatted string](https://crontab.guru/).\n+ `timezone`, which is the [english-named\n  timezone](https://code2care.org/pages/java-timezone-list-utc-gmt-offset) like\n  `America/New_York`.\n+ `execute`, which is a function that takes in a `client` and returns a\n  function to be run on a cron schedule. For a simple example of this, check out\n  [clean-github-channel.js](https://github.com/thesis/bishop/blob/ec9038b6175fc067a3da57cb2e1d7af1be7ada89/cron/clean-github-channel.js).\n\n### Local Development\n1. Create your own bot using the [the discord developer portal](https://discord.com/developers/applications).\n1. Make sure your bot has the proper server authorizations \u003cimg width=\"1351\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1045160/208538427-77f0dfdd-3629-49f3-9366-41b934c6cb05.png\"\u003e\n1. Create a server, invite the bot to it, and give it a good permissions integer: `1089952280129` \n1. Clone this repo, and set the following environment variables below. I\n   recommend [direnv](https://direnv.net/) to manage this.\n1. Navigate to this directory.\n1. `$ npm ci`\n1. `$ node index.js`\n1. You should be greeted with something that looks like:\n\n```\nLogged in as TestBishop#6775!\nSuccessfully registered application commands.\n```\n\n\n### Environment Configuration\n\n+ `TOKEN`: The token for the discord bot from the discord API.\n+ `ROLE`: The role-id for @Keep. Use development mode and right-click+copy id from the settings menu.\n+ `EMOJI`: The id of the emoji to indicate threading. Upload an emoji and then\n  inspect it in a web browser console. You should see something like\n  https://cdn.discordapp.com/emojis/{EMOJI_ID}.webp?size=64\u0026quality=lossless\n+ `GUILD`: The id of the server. Any link to a discord message has the\n  following structure:\n  https://discord.com/channels/GUID_ID/CHANNEL_ID/MESSAGE_ID.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesis%2Fbishop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesis%2Fbishop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesis%2Fbishop/lists"}