
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
create-djsbot
Advanced tools
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
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?
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
The TypeScript version uses better-sqlite3
as SQLite library. This is because in performance comparisons it performs better than libraries such as SQLite. The caveat however is that it needs a bit of extra work in setup. 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
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.
The Gulpfile is for recompiling single JavaScript files into TypeScript files for hot-reloading commands once you have your bot running on some kind of server
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
This project is open source and always will be, even if I don't get donations. That said, I know there are people out there that may still want to donate just to show their appreciation so this is for you guys. Thanks in advance!
I accept donations through PayPal, BitCoin, Ethereum and LiteCoin. You can use the buttons below to donate through your method of choice
Donate With | QR | Address |
---|---|---|
![]() | ![]() | Donate with PayPal |
![]() | ![]() | 1E643TNif2MTh75rugepmXuq35Tck4TnE5 |
![]() | ![]() | 0xF653F666903cd8739030D2721bF01095896F5D6E |
![]() | ![]() | LZHvBkaJqKJRa8N7Dyu41Jd1PDBAofCik6 |
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.