{"id":24064456,"url":"https://github.com/linzap/discord-example-app","last_synced_at":"2026-06-18T05:31:10.764Z","repository":{"id":72784548,"uuid":"603657720","full_name":"LinZap/discord-example-app","owner":"LinZap","description":"discord-example-app","archived":false,"fork":false,"pushed_at":"2023-02-19T11:07:15.000Z","size":1211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T17:37:49.021Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinZap.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-02-19T07:12:09.000Z","updated_at":"2023-02-19T07:28:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"567bf6ca-371c-403c-9dc5-1889860add14","html_url":"https://github.com/LinZap/discord-example-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LinZap/discord-example-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinZap%2Fdiscord-example-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinZap%2Fdiscord-example-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinZap%2Fdiscord-example-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinZap%2Fdiscord-example-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinZap","download_url":"https://codeload.github.com/LinZap/discord-example-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinZap%2Fdiscord-example-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34478105,"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-06-18T02:00:06.871Z","response_time":128,"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":"2025-01-09T10:25:29.201Z","updated_at":"2026-06-18T05:31:10.759Z","avatar_url":"https://github.com/LinZap.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting Started app for Discord\n\nThis project contains a basic rock-paper-scissors-style Discord app written in JavaScript, built for the [getting started guide](https://discord.com/developers/docs/getting-started).\n\n![Demo of app](/assets/getting-started-demo.gif?raw=true)\n\n\u003e ✨ A version of this code is also hosted **[on Glitch 🎏](https://glitch.com/~getting-started-discord)** and **[on Replit 🌀](https://replit.com/github/discord/discord-example-app)**\n\n## Project structure\nBelow is a basic overview of the project structure:\n\n```\n├── examples    -\u003e short, feature-specific sample apps\n│   ├── button.js\n│   ├── command.js\n│   ├── modal.js\n│   ├── selectMenu.js\n├── .env.sample -\u003e sample .env file\n├── app.js      -\u003e main entrypoint for app\n├── commands.js -\u003e slash command payloads + helpers\n├── game.js     -\u003e logic specific to RPS\n├── utils.js    -\u003e utility functions and enums\n├── package.json\n├── README.md\n└── .gitignore\n```\n\n## Running app locally\n\nBefore you start, you'll need to install [NodeJS](https://nodejs.org/en/download/) and [create a Discord app](https://discord.com/developers/applications) with the proper permissions:\n- `applications.commands`\n- `bot` (with Send Messages enabled)\n\n\nConfiguring the app is covered in detail in the [getting started guide](https://discord.com/developers/docs/getting-started).\n\n### Setup project\n\nFirst clone the project:\n```\ngit clone https://github.com/discord/discord-example-app.git\n```\n\nThen navigate to its directory and install dependencies:\n```\ncd discord-example-app\nnpm install\n```\n### Get app credentials\n\nFetch the credentials from your app's settings and add them to a `.env` file (see `.env.sample` for an example). You'll need your app ID (`APP_ID`), server ID (`GUILD_ID`), bot token (`DISCORD_TOKEN`), and public key (`PUBLIC_KEY`).\n\nFetching credentials is covered in detail in the [getting started guide](https://discord.com/developers/docs/getting-started).\n\n\u003e 🔑 Environment variables can be added to the `.env` file in Glitch or when developing locally, and in the Secrets tab in Replit (the lock icon on the left).\n\n### Run the app\n\nAfter your credentials are added, go ahead and run the app:\n\n```\nnode app.js\n```\n\n\u003e ⚙️ A package [like `nodemon`](https://github.com/remy/nodemon), which watches for local changes and restarts your app, may be helpful while locally developing.\n\n### Set up interactivity\n\nThe project needs a public endpoint where Discord can send requests. To develop and test locally, you can use something like [`ngrok`](https://ngrok.com/) to tunnel HTTP traffic.\n\nInstall ngrok if you haven't already, then start listening on port `3000`:\n\n```\nngrok http 3000\n```\n\nYou should see your connection open:\n\n```\nTunnel Status                 online\nVersion                       2.0/2.0\nWeb Interface                 http://127.0.0.1:4040\nForwarding                    http://1234-someurl.ngrok.io -\u003e localhost:3000\nForwarding                    https://1234-someurl.ngrok.io -\u003e localhost:3000\n\nConnections                  ttl     opn     rt1     rt5     p50     p90\n                              0       0       0.00    0.00    0.00    0.00\n```\n\nCopy the forwarding address that starts with `https`, in this case `https://1234-someurl.ngrok.io`, then go to your [app's settings](https://discord.com/developers/applications).\n\nOn the **General Information** tab, there will be an **Interactions Endpoint URL**. Paste your ngrok address there, and append `/interactions` to it (`https://1234-someurl.ngrok.io/interactions` in the example).\n\nClick **Save Changes**, and your app should be ready to run 🚀\n\n## Other resources\n- Read **[the documentation](https://discord.com/developers/docs/intro)** for in-depth information about API features.\n- Browse the `examples/` folder in this project for smaller, feature-specific code examples\n- Join the **[Discord Developers server](https://discord.gg/discord-developers)** to ask questions about the API, attend events hosted by the Discord API team, and interact with other devs.\n- Check out **[community resources](https://discord.com/developers/docs/topics/community-resources#community-resources)** for language-specific tools maintained by community members.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinzap%2Fdiscord-example-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinzap%2Fdiscord-example-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinzap%2Fdiscord-example-app/lists"}