![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
create-djsbot
Advanced tools
CLI for easily bootstrapping a DiscordJS bot with the Commando framework
Project Status
NPM Versions
Social Media and Donations
yarn create djsbot
# or for reusability
yarn global add create-djsbot
create-djsbot mybot
npx create-djsbot mybot
# or for reusability
npm install --global create-djsbot
create-djsbot mybot
Before documenting anything else I just want to put out here that I'll maintain this project in terms of (security) issues, major updates are less likely to come quickly if at all. This is because these templates are based on the Commando framework whilst I have moved to the Klasa framework myself for my own bot. That said however this generator is still a great way to get started with any bot regardless of framework you end up using.
Create DJSBot - Easily bootstrap your bot!
Usage:
create-djsbot
create-djsbot --help
create-djsbot --name mybot
Options:
--help Show help [boolean]
--version Show version number [boolean]
--interactive [default: true]
--name What is the name of your bot project?
--description What is the description for this bot?
--author Who is the author of the bot? (GitHub username)
--license What license do you want the bot to have? [choices: "MIT", "GPL-3.0-or-later", "Apache-2.0", "Unlicense", "MPL-2.0"]
--repo Do you have an URL for the Git repository for the bot?
--gitinit Should a the repo be initialized with "git init"?
--manager Do you want to use Yarn or NPM? [choices: "npm", "yarn"]
--template Do you want to use JavaScript or TypeScript? [choices: "javascript", "typescript"]
--prefix What is the bot prefix you want to set as default?
--ownerid What is your Discord userID that will be registered as the bot owner?
--token And lastly, do you already have a token the bot will use?
If the template fails to run the npm install
or yarn install
, please follow these instructions before getting support:
npm i windows-build-tools --production --vs2015 --add-python-to-PATH --global
in an administrative CMD or Powershellxcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo apt-get install -y build-essential
A few notes should be shared about the TypeScript template that are important to note
It uses forks of Discord.JS and Discord.JS-Commando that are based on the "master" branch so please refer to the "master" documentation. The reason for this is that Commando has added a lot of extra TypeScript support since it's latest stable release and when using the "master" branch for Discord.JS-Commando then the master branch for Discord.JS should also be used. I (Favna) manage these forks and ensure they are always stable before publishing any updates as I use them in my own bot
In TypeScript you should to use ES6 imports/exports rather than CommonJS module.exports
and require
as it's far more efficient, adds a lot of cool features such as default exports, named exports and advanced imports and it's far easier to write and remember.
You should not use ts-node
to run your bot unless during development. It is very slow and inefficient for production environments.
Therefore always compile your bot to JavaScript using npm run build
or yarn build
And do not remove anything from the build
, prebuild
, postbuild
, copyfiles
or replace
scripts. Doing so will either cause your bot to not build properly at all, or cause inefficiencies in the long term. Adding to it is perfectly fine however!
The TypeScript config allows you to use aliases for easier accessing the commands
and utils
folders. For example if you need to log something you can import log from '@utils/winston'
(which imports the winston.ts
file at src/utils/winston.ts
, no matter how many subfolders deep you are) then use this as log.info()
.
When getting support anywhere always specify that you are writing TypeScript to get the best support.
You can always join my server for support as well.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Copyright © 2018-2019, Favware. Released under the MIT License.
The DiscordJS team for the DiscordJS Library and Commando Framework
Travis Fischer for the project create-react-library which inspired me to make this
FAQs
CLI for easily bootstrapping a DiscordJS bot with the Commando framework
The npm package create-djsbot receives a total of 1 weekly downloads. As such, create-djsbot popularity was classified as not popular.
We found that create-djsbot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.