
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socketโs new workflow scanning support.
djs-builder
Advanced tools

Welcome to the ultimate Discord Bot Utilities package! ๐ฅ Boost your Discord bot development with ease, speed, and all-in-one features.
The starter function is the ultimate initializer for your Discord bot ๐ค. It handles everything from logging in, loading commands/events, setting the bot presence, anti-crash protection, logging commands usage, and even checking for library updates.
Features:
djs-builder ๐ฆ๐ก Tip: Any option you donโt want, just remove it ๐๏ธ.
const { starter } = require("djs-builder");
const { Client, GatewayIntentBits } = require("discord.js");
const client = new Client({
intents: Object.keys(GatewayIntentBits).map((a) => GatewayIntentBits[a]),
});
// Define starter options
const starterOptions = {
bot: {
token: "YOUR_BOT_TOKEN", // ๐ Discord bot token
ownerId: "YOUR_USER_ID", // ๐ค Bot owner ID
},
terminal: true, // ๐ฅ๏ธ Show bot info in terminal
Status: {
status: "online", // โ
Presence state: online, dnd, idle, offline
activities: ["Game 1", "Game 2"], // ๐ฎ Multiple activities
type: 0, // ๐ญ Activity type: (0=PLAYING, 1=STREAMING, 2=LISTENING, 3=WATCHING)
time: 60000, // โฑ๏ธ Rotate activities every X ms
url: "https://twitch.tv/example", // ๐ Twitch URL (only required for streaming)
},
database: {
url: "mongodb://localhost:27017", // ๐พ MongoDB connection
},
anticrash: {
url: "https://your.crash.webhook.url", // ๐จ Webhook for crash reports
mention_id: "YOUR_USER_ID", // ๐ฃ Optional: mention user on crash
},
};
// Start the bot
await starter(client, starterOptions);
Game 1 โ Game 2 โ โฆ) โฑ๏ธ.Catches and logs:
unhandledRejectionuncaughtExceptionuncaughtExceptionMonitorunhandledRejectionMonitorwarning โ ๏ธSends error reports to a webhook ๐จ.
Optionally pings the owner ๐ฃ.
Displays colorful and structured information ๐ฅ๏ธ:
Powered by cli-table3 + chalk for a professional CLI look ๐จ.
djs-builder automatically ๐.Access detailed stats about loaded files directly from the client:
Available via client.files, useful for debugging or terminal display ๐ ๏ธ.
Than the discord.js
๐ต CreateRow โ Easily create Discord Action Rows with Buttons & Select Menus โจ
CreateRow is a powerful utility to build Discord Action Rows. It supports:
string, role, user, channel)defaultValues and channelTypes.const { CreateRow } = require("djs-builder");
const actionRow = new CreateRow([
//// For each new row, use [] for buttons or {} for a select menu
// ๐น Row #1: Buttons
[
{
id: "button1", // customId for the button
style: 1, // Button styles: Primary(1), Secondary(2), Success(3), Danger(4), Link(5)
label: "Primary Button", // Text shown on button
emoji: "๐", // Emoji displayed
disabled: false, // true = disabled
},
{
id: "button2",
style: 2,
emoji: "๐",
disabled: true, // Button is disabled
},
],
// ๐น Row #2: Select Menu
{
type: "string", // Options: "string" | "role" | "user" | "channel"
options: {
id: "menu1", // customId for the select menu
placeholder: "Select an option",
min: 1, // Minimum selection
max: 2, // Maximum selection
// ๐ธ Data for string select only
data: [
{
name: "Option 1",
id: "opt1",
about: "First option",
icon: "๐",
default: true,
},
{ name: "Option 2", id: "opt2", about: "Second option", icon: "๐" },
{ name: "Option 3", id: "opt3", about: "Third option", icon: "๐" },
],
// ๐ธ Map keys
label: "name", // Which field is the label
value: "id", // Which field is the value
description: "about", // Description for each option
emoji: "icon", // Emoji for each option
// ๐ธ Extra options
disabled: false, // Disable the entire menu
defaultValues: [
// For role/user/channel menus
{ id: "123456789012345678", type: "user" }, // Pre-selected
],
channelTypes: [0, 2], // Only for ChannelSelectMenu (0 = Text, 2 = Voice)
},
},
]);
id โ customId for the buttonstyle โ 1: Primary, 2: Secondary, 3: Success, 4: Danger, 5: Linklabel โ Button textemoji โ Displayed emojidisabled โ true = button is unclickabletype โ "string" | "user" | "role" | "channel"
id โ customId for menu
placeholder โ Text shown before selection
min / max โ Min/Max selectable values
data โ Options array (for string select only)
label โ Visible textvalue โ Internal valuedescription โ Short descriptionemoji โ Option emojidefault โ Pre-selected optiondisabled โ Disable menu completely
defaultValues โ Pre-selected user/role/channel options
channelTypes โ Restrict selectable channel types
๐งพ CreateBar โ Text-based Progress Bar for Discord โจ
CreateBar allows you to display a customizable progress bar with optional percentages and partial symbols. Perfect for showing progress, loading, or stats in messages.
const { CreateBar } = require("djs-builder");
const bar = new CreateBar(7, 10, {
length: 20, // Total length of the bar
fill: "๐", // Filled portion
empty: "๐ค", // Empty portion
partialChar: "๐", // Partial fill
showPercent: true, // Show percentage
left: "โฐ", // Left bracket
right: "โฑ", // Right bracket
});
console.log(bar);
// Output: โฐ๐๐๐๐๐๐๐๐๐ค๐ค๐ค๐ค๐ค๐ค๐ค๐ค๐ค๐คโฑ 70%
console.log(
CreateBar(3.7, 5, {
fill: "๐ฆ",
empty: "โฌ",
partialChar: "๐จ",
length: 10,
left: "โฐ",
right: "โฑ",
showPercent: true,
})
);
// Output: โฐ๐ฆ๐ฆ๐ฆ๐จโฌโฌโฌโฌโฌโฌโฑ 74%
console.log(
CreateBar(4, 8, {
fill: "๐ต",
empty: "โช",
showPercent: false,
})
);
// Output: ๐ต๐ต๐ต๐ตโชโชโชโช
console.log(
CreateBar(6, 10, {
length: 12,
fill: "๐ฅ",
empty: "โ๏ธ",
partialChar: "๐",
showPercent: true,
left: "ยซ",
right: "ยป",
})
);
// Output: ยซ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐ฅ๐โ๏ธโ๏ธโ๏ธโ๏ธยป 60%
length โ Total number of symbolsfill โ Symbol for filled portionempty โ Symbol for empty portionpartialChar โ Symbol for partial fill (e.g., half-filled)showPercent โ Show percentage at the endleft / right โ Brackets or edges for the barโฐ Wait โ Await messages, buttons, select menus or modals easily โจ
Wait is a replacement for traditional collectors. It supports:
const { Wait } = require("djs-builder");
const response = await Wait({
context: message, // Message or Interaction object
userId: message.author.id, // Optional: filter by user
type: "both", // "message" | "interaction" | "both"
time: 30000, // Time in ms
message_Wait: message, // Required if waiting for buttons/selects
});
if (!response) return console.log("โฑ๏ธ Timeout!");
console.log("โ
Collected:", response);
context โ The message or interaction contextuserId โ Only collect from this user (optional)type โ "message" | "interaction" | "both"time โ Timeout in millisecondsmessage_Wait โ Message containing buttons/select menus (for interaction/both type)๐ค GetUser โ Fetch a GuildMember easily from a message โจ
GetUser helps to detect a target member in multiple ways:
@User)123456789012345678)const { GetUser } = require("djs-builder");
const data = await GetUser(message);
if (!data) return message.reply("โ Could not find the user.");
const member = data.user; // GuildMember object
const args = data.args; // Remaining arguments
const reason = args.join(" ") || "No reason provided";
await member.ban({ reason });
message.reply(`๐ซ ${member.user.tag} was banned for: ${reason}`);
{
user: <GuildMember>, // Targeted member
args: [ "arg1", "arg2" ] // Remaining message arguments
}
!ban @Ahmed Spamming!ban 123456789012345678 SpammingReply to user's message with !bannull if user not foundThe Logging System is a powerful feature that keeps track of almost everything happening inside your Discord server ๐.
From messages ๐ to channels ๐, roles ๐ญ, invites ๐, and even voice state changes ๐๏ธ โ nothing goes unnoticed!
Using the log function is very simple โก.
Just place this code inside an event (like clientReady) to start logging:
const { log } = require("djs-builder");
module.exports = {
name: "clientReady",
async run(client) {
await log(
client,
"GUILD_ID", // ๐ Guild ID (server)
"CHANNEL_ID" // ๐ข Channel ID for logs
);
},
};
๐ก Commands & Events made easy!
With djs-builder, handling commands and events is smooth, fast, and fully customizable.
You get built-in features like:
Below are all the available properties you can use for your commands and events:
name: 'string', // ๐ท๏ธ Command name (required)
aliases: ['string'], // ๐ Alternative names (Prefix only)
description: 'string', // โ๏ธ Short description of the command
cooldown: 5, // โณ Cooldown in seconds before reusing the command
Permissions: ['ADMINISTRATOR'],// ๐ก๏ธ Required permissions to execute the command
ownerOnly: true, // ๐ Only server owner can use this command
devOnly: true, // ๐ ๏ธ Only bot developer can use this command
guildOnly: true, // ๐ Command works only in servers
dmOnly: true, // โ๏ธ Command works only in DMs
fastUse: true, // โก Allow command to be executed without prefix (Prefix only)
run: Function, // ๐โโ๏ธ Main function to run the command
execute: Function, // ๐โโ๏ธ Alternative function to run the command
name: 'string', // ๐ท๏ธ Event name (e.g., messageCreate, guildMemberAdd)
once: true, // ๐ฏ If true, the event will be executed only once
run: Function, // ๐โโ๏ธ Function to run when the event triggers
execute: Function // ๐โโ๏ธ Alternative function to run the event
๐ก Tip: Use these properties to fully control command behavior, access, and event handling.
We welcome contributions! If you have any suggestions, bug reports, or feature requests, feel free to reach out to us on Discord.
๐ฌ Contact Me: <@679036538511687711>
๐ Join our Discord:
FAQs
๐ Package Update! ๐ฅ
The npm package djs-builder receives a total of 280 weekly downloads. As such, djs-builder popularity was classified as not popular.
We found that djs-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 2 open source maintainers 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.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socketโs new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.