{"id":13809265,"url":"https://github.com/itsMapleLeaf/gatekeeper","last_synced_at":"2025-05-14T05:33:41.427Z","repository":{"id":45923142,"uuid":"395894028","full_name":"itsMapleLeaf/gatekeeper","owner":"itsMapleLeaf","description":"supercharge your discord commands by gatekeeping them in a flow of reactivity ⛓⚡","archived":true,"fork":false,"pushed_at":"2022-08-10T04:24:15.000Z","size":1787,"stargazers_count":52,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T01:43:19.304Z","etag":null,"topics":["discord","discord-bot","discord-bot-framework","discord-js","framework","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/itsMapleLeaf.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":"2021-08-14T04:54:06.000Z","updated_at":"2023-04-14T07:51:55.000Z","dependencies_parsed_at":"2022-08-23T03:40:17.903Z","dependency_job_id":null,"html_url":"https://github.com/itsMapleLeaf/gatekeeper","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMapleLeaf%2Fgatekeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMapleLeaf%2Fgatekeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMapleLeaf%2Fgatekeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsMapleLeaf%2Fgatekeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsMapleLeaf","download_url":"https://codeload.github.com/itsMapleLeaf/gatekeeper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254077024,"owners_count":22010643,"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":["discord","discord-bot","discord-bot-framework","discord-js","framework","javascript","typescript"],"created_at":"2024-08-04T01:02:13.680Z","updated_at":"2025-05-14T05:33:41.039Z","avatar_url":"https://github.com/itsMapleLeaf.png","language":"TypeScript","readme":"# This project is deprecated\n\n**TL;DR:** Use [Reacord](https://github.com/itsMapleLeaf/reacord)\n\nI'm moving away from this project's development for a few reasons:\n\n- The command handling part is limited, and doesn't accomodate the use cases that a decent portion of bots need, e.g. being able to add a command for individual guilds\n- The reactivity part has gaps, and also makes you use it everywhere with no opt-out\n\nFor that reason, I split out the reactivity part into a new library: [Reacord](https://github.com/itsMapleLeaf/reacord). It allows you to leverage JSX, react state, as well as the react ecosystem, and is much more powerful than what gatekeeper offers to accomplish the same goal. I would recommend using Reacord if you want declarative, highly interactive messages.\n\nFor command handling, I can't recommend a library for that (yet?), but you can build your own simple command handler: [(1)](https://github.com/itsMapleLeaf/bae/blob/62c6d6fd2983f3f5e60c2a6619f48d38030c79da/src/helpers/commands.ts) [(2)](https://github.com/itsMapleLeaf/bae/blob/62c6d6fd2983f3f5e60c2a6619f48d38030c79da/src/main.tsx#L14-L62)\n\n# gatekeeper\n\nGatekeeper is a ✨reactive✨ interaction framework for discord.js!\n\n- [Guide](./docs/guide.md)\n- [Examples](./packages/playground/src/commands)\n- [API Docs](https://itsmapleleaf.github.io/gatekeeper/api/)\n\nInstall:\n\n```sh\n# npm\nnpm install @itsmapleleaf/gatekeeper discord.js\n\n# yarn\nyarn add @itsmapleleaf/gatekeeper discord.js\n\n# pnpm\npnpm add @itsmapleleaf/gatekeeper discord.js\n```\n\nHere's a taste of what Gatekeeper looks like:\n\n```js\nimport { buttonComponent, Gatekeeper } from \"@itsmapleleaf/gatekeeper\"\nimport { Client, Intents } from \"discord.js\"\n\nconst client = new Client({\n  intents: [Intents.FLAGS.GUILDS],\n})\n\n;(async () =\u003e {\n  const gatekeeper = await Gatekeeper.create({\n    client,\n  })\n\n  gatekeeper.addSlashCommand({\n    name: \"counter\",\n    description: \"make a counter\",\n    run(context) {\n      let count = 0\n\n      context.reply(() =\u003e [\n        `button pressed ${count} times`,\n        buttonComponent({\n          style: \"PRIMARY\",\n          label: \"press it\",\n          onClick: () =\u003e {\n            count += 1\n          },\n        }),\n      ])\n    },\n  })\n\n  await client.login(process.env.BOT_TOKEN)\n})()\n```\n\nAnd a silly example, demonstrating the power of the library. [You can find the code here](./packages/playground/src/commands/counter-factory.ts)\n\n![showcase](./showcase.gif)\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FitsMapleLeaf%2Fgatekeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FitsMapleLeaf%2Fgatekeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FitsMapleLeaf%2Fgatekeeper/lists"}