{"id":16974688,"url":"https://github.com/nulldev/discordjs-template","last_synced_at":"2025-04-12T00:50:49.012Z","repository":{"id":171730493,"uuid":"648324548","full_name":"NullDev/DiscordJS-Template","owner":"NullDev","description":"Template repository for DiscordJS Projects: sharding, i18n, QuickDB, PM2, Auto deploy","archived":false,"fork":false,"pushed_at":"2025-04-03T11:38:03.000Z","size":599,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T05:38:31.665Z","etag":null,"topics":["auto-deploy","bot","discord","discord-bot","discord-js","i18n","javascript","nulldev","pm2","quickdb","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/NullDev.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-06-01T17:54:40.000Z","updated_at":"2025-04-03T11:38:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8813ed3-a368-452e-8e2a-b509aefb0f04","html_url":"https://github.com/NullDev/DiscordJS-Template","commit_stats":null,"previous_names":["nulldev/discordjs-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FDiscordJS-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FDiscordJS-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FDiscordJS-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FDiscordJS-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NullDev","download_url":"https://codeload.github.com/NullDev/DiscordJS-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501901,"owners_count":21114681,"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":["auto-deploy","bot","discord","discord-bot","discord-js","i18n","javascript","nulldev","pm2","quickdb","template"],"created_at":"2024-10-14T01:07:36.153Z","updated_at":"2025-04-12T00:50:48.989Z","avatar_url":"https://github.com/NullDev.png","language":"JavaScript","readme":"# DiscordJS-Template\n[![NullDev/DiscordJS-Template](https://img.shields.io/badge/Template%3A-NullDev%2FDiscordJS--Template-green?style=flat-square\u0026logo=github)](https://github.com/NullDev/DiscordJS-Template) [![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/NullDev/DiscordJS-Template?logo=Cachet)](https://github.com/NullDev/DiscordJS-Template/issues?q=is%3Aissue+is%3Aclosed)\n\n\u003cp align=\"center\"\u003e\u003cimg height=\"250\" width=\"auto\" src=\"https://github.com/NullDev/DiscordJS-Template/assets/22935000/6cb7ed23-865b-4917-92b8-c0a2a2b61935\" /\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cb\u003eTemplate repository for DiscordJS Projects\u003c/b\u003e\u003c/p\u003e\n\u003chr\u003e\n\n\n## :question: What is this?\n\nThis is a template repository for DiscordJS projects. It includes a basic setup for a Discord bot with:\n- [x] A command handler\n- [x] An event handler\n- [x] A typed (autocomplete) config system that supports nesting and functions\n- [x] A logger (both console and file)\n- [x] Slash command support\n- [x] Multi language support (i18n) in both messages and commands\n- [x] QuickDB for persistent storage\n- [x] Deployment via GitHub Actions and [PM2](https://pm2.keymetrics.io/)\n- [x] ESLint\n- [x] Cron jobs for scheduled tasks such as cleanups (logs / database)\n- [x] Sharding support\n- [x] Admin / User only commands\n- [x] Easy to set up\n- [x] Minimalistic REST-API base for potential dashboard or OAuth \n\n\u003chr\u003e\n\n## :diamond_shape_with_a_dot_inside: Feature requests \u0026 Issues\n\nFeature request or discovered a bug? Please [open an Issue](https://github.com/NullDev/DiscordJS-Template/issues/new/choose) here on GitHub.\n\n\u003chr\u003e\n\n## :white_flower: Other branches\n\nThere are other branches with different feature sets:\n- [master](https://github.com/NullDev/DiscordJS-Template/tree/master) - The default branch with all features (if you can read this, you are already here)\n- [no-i18n](https://github.com/NullDev/DiscordJS-Template/tree/no-i18n) - No i18n / multi language support, command localization, etc\n- [webserver](https://github.com/NullDev/DiscordJS-Template/tree/webserver) - A basic webserver with a REST-API base e.g. for OAuth or a dashboard [CURRENTLY OUTDATED!!!]\n\n\u003chr\u003e\n\n## :wrench: Dev Setup\n\n0. Open up your favourite terminal (and navigate somewhere you want to download the repository to). \u003cbr\u003e\u003cbr\u003e\n1. Make sure you have NodeJS installed (\u003e= v20.0.0). Test by entering \u003cbr\u003e\n$ `node -v` \u003cbr\u003e\nIf this returns a version number, NodeJS is installed. **If not**, get NodeJS \u003ca href=\"https://nodejs.org/en/download/package-manager/\"\u003ehere\u003c/a\u003e. \u003cbr\u003e\u003cbr\u003e\n2. Clone the repository and navigate to it. If you have Git installed, type \u003cbr\u003e\n$ `git clone https://github.com/NullDev/DiscordJS-Template.git \u0026\u0026 cd DiscordJS-Template` \u003cbr\u003e\nIf not, download it \u003ca href=\"https://github.com/NullDev/DiscordJS-Template/archive/master.zip\"\u003ehere\u003c/a\u003e and extract the ZIP file.\u003cbr\u003e\nThen navigate to the folder.\u003cbr\u003e\u003cbr\u003e\n3. Install all dependencies by typing \u003cbr\u003e\n$ `npm install`\u003cbr\u003e\u003cbr\u003e\n4. Copy [config/config.template.js](https://github.com/NullDev/DiscordJS-Template/blob/master/config/config.template.js) and paste it as `config/config.custom.js` OR use `npm run generate-config`. \u003cbr\u003e\u003cbr\u003e\n5. Configure it in your favourite editor by editing `config/config.custom.js`. \u003cbr\u003e\u003cbr\u003e\n6. Change some strings by running \u003cbr\u003e\n$ `npm run setup-template` \u003cbr\u003e\u003cbr\u003e\n7. Start it in development mode by running \u003cbr\u003e\n$ `npm start` \u003cbr\u003e\nor start in production mode \u003cbr\u003e\n$ `npm run start:prod` \u003cbr\u003e\u003cbr\u003e\n\n\u003chr\u003e\n\n## :satellite: Things to change in the template\n\n\u003e NOTE: You don't have to do that manually. Just run `npm run setup-template` !\n\n- package.json\n    - [name](https://github.com/NullDev/DiscordJS-Template/blob/master/package.json#L2)\n    - [description](https://github.com/NullDev/DiscordJS-Template/blob/master/package.json#L6)\n    - [repository links](https://github.com/NullDev/DiscordJS-Template/blob/master/package.json#L20-L27)\n    - [author](https://github.com/NullDev/DiscordJS-Template/blob/master/package.json#L28)\n- pm2.ecosystem.json\n    - [name](https://github.com/NullDev/DiscordJS-Template/blob/master/pm2.ecosystem.json#L4)\n    - [repo](https://github.com/NullDev/DiscordJS-Template/blob/master/pm2.ecosystem.json#L10)\n- Bot Info Tagline\n    - [English](https://github.com/NullDev/DiscordJS-Template/blob/master/locales/English_en.json#L8)\n    - [German (example)](https://github.com/NullDev/DiscordJS-Template/blob/master/locales/German_de.json#L8)\n- Bot Info Author / Link\n    - [author name](https://github.com/NullDev/DiscordJS-Template/blob/master/src/commands/user/info.js#L59)\n    - [repo link or website](https://github.com/NullDev/DiscordJS-Template/blob/master/src/commands/user/info.js#L64)\n- Bot invite link in issues\n    - [config.yml](https://github.com/NullDev/DiscordJS-Template/blob/master/.github/ISSUE_TEMPLATE/config.yml#L4)\n- And you probably want to change this README here :P\n\n\u003chr\u003e\n\n## :rocket: Deployment\n\n- Clone the repo to your server\n- Add the correct [secrets](https://github.com/NullDev/DiscordJS-Template/blob/master/.github/workflows/cd.yml#L27-L34) to your repository settings \n    - SSH_HOST: The host (domain / IP) of the server you want to deploy to\n    - SSH_PORT: The SSH port of the server you want to deploy to (usually 22)\n    - SSH_USER: The SSH user of the server you want to deploy to\n    - SSH_KEY: The private SSH key of the server you want to deploy to\n    - REPO_PATH: The path to the repository on the server (where you cloned to, e.g.: `/home/bots/MyCoolBot`)\n    - PM2_HOME: [OPTIONAL] The path to the PM2 home directory, if it's custom (e.g.: `/home/bots/.pm2`)\n- Install PM2 on the server by running `npm install pm2 -g`\n- Start the bot initially by running `pm2 start pm2.ecosystem.json`\n- Save the current PM2 configuration by running `pm2 save`\n- Enable PM2 to start on boot by running `pm2 startup` and following the instructions\n- Done! :tada:\n\n\u003chr\u003e\n\n## :nut_and_bolt: Configuration\n\nOnce the config has been copied like described in [Step 4](#wrench-dev-setup) of the setup, it can be changed to your needs:\n\n| Config Key | Description | Data Type | Default value |\n| ---------- | --------- | ------------------ | ------------ |\n| discord: \u003cbr\u003e `bot_token` | Auth Token of the Discord bot. Can be created [here](https://discordapp.com/developers/). | String | N/A |\n\n\u003chr\u003e\n\n## :star: Bots using this Template\n\n- [NullDev/Arithmetica-Bot](https://github.com/NullDev/Arithmetica-Bot) - A counting bot that supports arithmetic expressions\n- [NullDev/Discord-RoleShop](https://github.com/NullDev/Discord-RoleShop) - A Bot for a Roleshop with currency that can be earned by writing messages\n- [arellak/gpt_image_discord_bot](https://github.com/arellak/gpt_image_discord_bot) - A Discord bot that generates images using DALL-E\n- [arellak/mukaji_chat](https://github.com/arellak/mukaji_chat) - Chat  bot using Markov chains\n- [altrusin/chimera](https://github.com/altrusin/chimera) - A Discord management bot\n- ... you? Create an [issue](https://github.com/NullDev/DiscordJS-Template/issues/new/choose) or a [PR](https://github.com/NullDev/DiscordJS-Template/pulls) to get featured here!\n \n\u003chr\u003e\n\n## :scroll: License\n\nThis Template is Licensed under [MIT](https://github.com/NullDev/DiscordJS-Template/blob/master/LICENSE). \u003cbr\u003e\n**You are free to change the license in your Project to whatever you want!** \u003cbr\u003e\nBut _please_ credit this Repository here in some way, shape or form :) \u003cbr\u003e\n\nHere's a bade you can use: \n\n[![NullDev/DiscordJS-Template](https://img.shields.io/badge/Template%3A-NullDev%2FDiscordJS--Template-green?style=flat-square\u0026logo=github)](https://github.com/NullDev/DiscordJS-Template)\n\n```markdown\n[![NullDev/DiscordJS-Template](https://img.shields.io/badge/Template%3A-NullDev%2FDiscordJS--Template-green?style=flat-square\u0026logo=github)](https://github.com/NullDev/DiscordJS-Template)\n```\n\n\u003chr\u003e\n\n## :octocat: Contributors\n\n\u003ca href=\"https://github.com/NullDev/DiscordJS-Template/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=NullDev/DiscordJS-Template\" /\u003e\n\u003c/a\u003e\n\n\u003csub\u003eMade with [contrib.rocks](https://contrib.rocks).\u003c/sub\u003e\n\n\u003chr\u003e\n\n![banner](https://repository-images.githubusercontent.com/648324548/b314e053-9230-460f-922c-f03c8527c9c5)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulldev%2Fdiscordjs-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnulldev%2Fdiscordjs-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulldev%2Fdiscordjs-template/lists"}