{"id":14983430,"url":"https://github.com/linuspotocnik/examplebot","last_synced_at":"2025-08-21T03:33:08.927Z","repository":{"id":38301315,"uuid":"447757201","full_name":"LinusPotocnik/ExampleBot","owner":"LinusPotocnik","description":"A simple Discord bot using Discord.js v14 and ES6 modules.","archived":false,"fork":false,"pushed_at":"2024-12-04T16:07:27.000Z","size":119,"stargazers_count":36,"open_issues_count":2,"forks_count":13,"subscribers_count":0,"default_branch":"v14","last_synced_at":"2025-07-20T14:39:15.816Z","etag":null,"topics":["discord","discordjs","discordjs-bot","es6","example","nodejs","starter-project","template"],"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/LinusPotocnik.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,"zenodo":null}},"created_at":"2022-01-13T21:26:39.000Z","updated_at":"2025-04-19T09:59:09.000Z","dependencies_parsed_at":"2023-11-08T13:38:25.751Z","dependency_job_id":"406e7c1e-751a-4f0b-b658-6df67f7cce9e","html_url":"https://github.com/LinusPotocnik/ExampleBot","commit_stats":{"total_commits":54,"total_committers":4,"mean_commits":13.5,"dds":0.5,"last_synced_commit":"0f7d59cecc6baa9e7579587e5d41d0082195306c"},"previous_names":["linuspotocnik/examplebot","lifedevelopment/examplebot"],"tags_count":14,"template":true,"template_full_name":null,"purl":"pkg:github/LinusPotocnik/ExampleBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusPotocnik%2FExampleBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusPotocnik%2FExampleBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusPotocnik%2FExampleBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusPotocnik%2FExampleBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusPotocnik","download_url":"https://codeload.github.com/LinusPotocnik/ExampleBot/tar.gz/refs/heads/v14","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusPotocnik%2FExampleBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271420555,"owners_count":24756595,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":["discord","discordjs","discordjs-bot","es6","example","nodejs","starter-project","template"],"created_at":"2024-09-24T14:07:12.079Z","updated_at":"2025-08-21T03:33:08.700Z","avatar_url":"https://github.com/LinusPotocnik.png","language":"JavaScript","readme":"# Discord.js v14 Example Bot\n\n[Extra info](https://github.com/LinusPotocnik/ExampleBot/releases/latest)\n\n## Table of Contents\n\n- [Your next steps](#next-steps)\n- [Installing the bot](#install)\n- [Finding your Bot Token](#finding-your-bot-token)\n- [Finding your Bot ID](#finding-your-bot-id)\n- [Inviting your Bot](#inviting-your-bot)\n- [Installing NodeJS/npm](#install-nodejs-and-npm-on-windows-and-macos)\n- [Updating NodeJS](#update-nodejs)\n- [Updating npm](#update-npm)\n\n## Next steps\n\nIf you don't know what to do next, here are some ideas:\n\n- Use the [discord.js](https://discord.js.org/#/) documentation to implement things like buttons, modals (input forms), context menu commands, select menus and more!\n- Use the Discord API to implement multi-language support that fetches the language from the user's Discord settings\n- Understand the basics of databases (e.g., SQL, MongoDB, etc.) to make data persistent.\n  - For example, you can store your data in a SQLite database using the [better-sqlite3](https://www.npmjs.com/package/better-sqlite3) package\n- Dockerize the project so you can easily deploy it and keep it up to date\n  - Implement a workflow that:\n    - Builds a new Docker image (for multiple platforms?) when a PR gets pushed to a specific branch\n    - Pushes said images to [Dockerhub](https://hub.docker.com)\n    - Checks for new images on Dockerhub and restarts the bot if a new image is available using [Watchtower](https://containrrr.dev/watchtower/)\n    - Use Docker volumes to store the database and other data\n- Implement a web dashboard to manage your bot using discord.js's [OAuth2](https://discordjs.guide/oauth2/#oauth2) module\n- Implement a logging system that logs all the bot's actions to a file or a database\n\n## Install\n\nBefore you follow this, make sure you use [NodeJS](#install-nodejs-and-npm-on-windows-and-macos) version 16.9.0 or higher and [npm](#install-nodejs-and-npm-on-windows-and-macos) version 8 or higher. You can check your installed versions of both by running `npm version`.\n\n- `git clone https://github.com/LinusPotocnik/ExampleBot.git`\n- `cd ExampleBot`\n- `npm install`\n- `echo \"BOT_TOKEN=YOUR_BOT_TOKEN\" \u003e\u003e .env`\n- `node .`\n\n## Finding your Bot Token\n\n- Head to the [Discord developer portal](https://discord.com/developers/applications)\n- Click on `New Application` (assuming you don't already have one), give your bot a name and click on `Create`\n- On the left side, click on `Bot`\n- Now, you should see the `Build-A-Bot` section. In the `Token` section of this, click on `Reset Token` and `Copy` the newly generated token.\n\nNOTE: Do NOT share this token with anyone!\n\n## Finding your Bot ID\n\nMake sure that you share a server with the bot you created. If this is not the case, go to the [invite](#inviting-your-bot) section.\n\n- Go to the [Discord developer portal](https://discord.com/developers/applications) and click on your application (bot)\n- On the left side, click on `OAuth2` -\u003e `Client information`\n- Under `Client ID`, click `Copy`\n\n## Inviting your Bot\n\nMake sure that you have already created a bot application. If not, follow the steps under [Finding the Bot Token](#finding-your-bot-token).\n\n- Go to the [Discord developer portal](https://discord.com/developers/applications) and click on your application (bot)\n- On the left side, click on `OAuth2` -\u003e `OAuth2 URL Generator`\n- Select `bot`\n- In the `Bot Permissions` section, select `Administrator`\n- Scroll down to the bottom of the page and click on `Copy`\n- Now paste the copied URL into a new tab and add the bot to your server\n\n## Install NodeJS and npm on Windows and macOS\n\n- Go to the [NodeJS Website](https://nodejs.org/en/) and download the current version\n- Install the downloaded file. This includes npm\n\n## Install NodeJS and npm on Linux\n\n- Update Linux:\n  `sudo apt-get update -y`\n- Download Node.js with curl:\n  `curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -`\n  (change the 20 to a different version if you wish to install a version of node that is not v20/LTS)\n- Install Node.js:\n  `sudo apt-get install -y nodejs`\n- Verify installation:\n  `node -v`\n\n## Update NodeJS\n\nIf you have an older version of NodeJS you can update it. If you are on a Windows machine, use all commands without a `sudo` and execute the terminal with administrator permissions.\n\n- `npm cache clean -f`\n- `sudo npm install -g n`\n- `sudo n latest`\n\n## Update npm\n\n### macOS/Linux\n\n- `sudo npm install -g npm@latest`\n\n### Windows\n\n- Please follow the [official npm guide for Windows](https://docs.npmjs.com/try-the-latest-stable-version-of-npm#upgrading-on-windows)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuspotocnik%2Fexamplebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuspotocnik%2Fexamplebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuspotocnik%2Fexamplebot/lists"}