

Welcome to the ultimate Discord Bot Utilities package! ๐ฅ
Boost your Discord bot development with ease, speed, and all-in-one features.
๐ Table of Contents
- ๐ฏ Starter โ Initialize your bot with commands, events, presence, and more.
- โ๏ธ Functions โ Utilities like CreateRow, CreateBar, Wait, and GetUser.
- โก Commands & Events โ Easy setup with cooldowns, permissions, logging, and anti-crash.
๐ฏ STARTER
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:
- ๐ ๏ธ One-line loader for both Slash & Prefix commands ๐ฉ
- ๐ Comprehensive terminal info display (commands, events, bot stats) ๐
- ๐งฐ Event handler loader in one line ๐
- โ ๏ธ Anti-crash system with automatic webhook reporting ๐
- ๐ MongoDB connection support ๐ฅ
- ๐ Command logger for both Slash and Prefix commands ๐งญ
- ๐ก Supports custom prefixes per guild and cooldowns โณ
- ๐ผ Automatic update checker for
djs-builder
๐ฆ
๐ก Tip: Any option you donโt want, just remove it ๐๏ธ.
Starter Usage โ๏ธ
const { starter } = require("djs-builder");
const { Client, GatewayIntentBits } = require("discord.js");
const client = new Client({
intents: Object.keys(GatewayIntentBits).map((a) => GatewayIntentBits[a]),
});
const starterOptions = {
bot: {
token: "YOUR_BOT_TOKEN",
ownerId: "YOUR_USER_ID",
},
terminal: true,
Status: {
status: "online",
activities: ["Game 1", "Game 2"],
type: 0,
time: 60000,
url: "https://twitch.tv/example",
},
database: {
url: "mongodb://localhost:27017",
},
anticrash: {
url: "https://your.crash.webhook.url",
mention_id: "YOUR_USER_ID",
},
};
await starter(client, starterOptions);
๐ How Starter Works
1๏ธโฃ Bot Login & Status
- Authenticates the bot using your token ๐.
- Supports multiple rotating activities (e.g.,
Game 1
โ Game 2
โ โฆ) โฑ๏ธ.
- Works with all Discord activity types: PLAYING, STREAMING, LISTENING, WATCHING ๐ญ.
- Twitch URL is supported for streaming mode ๐.
2๏ธโฃ Database Connection
- Connects automatically to MongoDB ๐พ.
- Useful for bots with persistent data storage.
3๏ธโฃ Anticrash System
4๏ธโฃ Terminal Info
5๏ธโฃ Auto Update Checker
- Monitors new versions of
djs-builder
automatically ๐.
- Sends update notifications to the webhook ๐.
6๏ธโฃ Bot Files Information
-
Access detailed stats about loaded files directly from the client:
- Number of prefix commands โก.
- Number of slash commands โ๏ธ.
- Number of events ๐.
-
Available via client.files
, useful for debugging or terminal display ๐ ๏ธ.
๐ก Tips
- Flexible: Delete any section you donโt need (anticrash, database, etc.) ๐๏ธ.
- Multi-Status: Add as many activities as you want and let them rotate ๐ฎ.
- Safe by Default: Anticrash system ensures your bot wonโt go down easily ๐ก๏ธ.
- Always Up-to-Date: Automatic update checker keeps your bot running on the latest version โฌ๏ธ.
- Transparent: Quickly check how many files your bot has loaded anytime ๐.
โ๏ธ functions
- Easyest โจ / Fastest โก /Clear ๐งต
Than the discord.js
CreateRow ๐ต
๐ต CreateRow โ Easily create Discord Action Rows with Buttons & Select Menus โจ
CreateRow
is a powerful utility to build Discord Action Rows. It supports:
- Buttons โ
- Select Menus ๐ฏ (
string
, role
, user
, channel
)
- Advanced options like
defaultValues
and channelTypes
.
๐ Example Usage:
const { CreateRow } = require("djs-builder");
const actionRow = new CreateRow([
[
{
id: "button1",
style: 1,
label: "Primary Button",
emoji: "๐",
disabled: false,
},
{
id: "button2",
style: 2,
emoji: "๐",
disabled: true,
},
],
{
type: "string",
options: {
id: "menu1",
placeholder: "Select an option",
min: 1,
max: 2,
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: "๐" },
],
label: "name",
value: "id",
description: "about",
emoji: "icon",
disabled: false,
defaultValues: [
{ id: "123456789012345678", type: "user" },
],
channelTypes: [0, 2],
},
},
]);
๐ Explanation
๐น Buttons
id
โ customId for the button
style
โ 1: Primary, 2: Secondary, 3: Success, 4: Danger, 5: Link
label
โ Button text
emoji
โ Displayed emoji
disabled
โ true = button is unclickable
-
type
โ "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 text
value
โ Internal value
description
โ Short description
emoji
โ Option emoji
default
โ Pre-selected option
-
disabled
โ Disable menu completely
-
defaultValues
โ Pre-selected user/role/channel options
-
channelTypes
โ Restrict selectable channel types
CreateBar ๐งพ
๐งพ 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.
๐ Basic Example:
const { CreateBar } = require("djs-builder");
const bar = new CreateBar(7, 10, {
length: 20,
fill: "๐",
empty: "๐ค",
partialChar: "๐",
showPercent: true,
left: "โฐ",
right: "โฑ",
});
console.log(bar);
๐ Another Example with different symbols:
console.log(
CreateBar(3.7, 5, {
fill: "๐ฆ",
empty: "โฌ",
partialChar: "๐จ",
length: 10,
left: "โฐ",
right: "โฑ",
showPercent: true,
})
);
๐ Minimalist example without percentage:
console.log(
CreateBar(4, 8, {
fill: "๐ต",
empty: "โช",
showPercent: false,
})
);
๐ Fun Emoji example:
console.log(
CreateBar(6, 10, {
length: 12,
fill: "๐ฅ",
empty: "โ๏ธ",
partialChar: "๐",
showPercent: true,
left: "ยซ",
right: "ยป",
})
);
๐น Options Summary
length
โ Total number of symbols
fill
โ Symbol for filled portion
empty
โ Symbol for empty portion
partialChar
โ Symbol for partial fill (e.g., half-filled)
showPercent
โ Show percentage at the end
left
/ right
โ Brackets or edges for the bar
๐น Notes
- Supports fractional values for partial fill
- Fully customizable with any emoji or character ๐จ
- Great for progress, stats, experience bars, or loading indicators
Wait โฐ
โฐ Wait โ Await messages, buttons, select menus or modals easily โจ
Wait
is a replacement for traditional collectors. It supports:
- Awaiting messages ๐
- Awaiting interactions (buttons / select menus) ๐๏ธ
- Awaiting modal submissions ๐
- Filtering by user and timeout
๐ Example Usage:
const { Wait } = require("djs-builder");
const response = await Wait({
context: message,
userId: message.author.id,
type: "both",
time: 30000,
message_Wait: message,
});
if (!response) return console.log("โฑ๏ธ Timeout!");
console.log("โ
Collected:", response);
๐น Options
context
โ The message or interaction context
userId
โ Only collect from this user (optional)
type
โ "message" | "interaction" | "both"
time
โ Timeout in milliseconds
message_Wait
โ Message containing buttons/select menus (for interaction/both type)
๐น Notes
- Supports automatic cleanup of collectors after completion
- Can return Message, Interaction, or ModalSubmitInteraction
GetUser ๐ค
๐ค GetUser โ Fetch a GuildMember easily from a message โจ
GetUser
helps to detect a target member in multiple ways:
- Mention (
@User
)
- User ID (
123456789012345678
)
- Reply to another message
๐ Example Usage:
const { GetUser } = require("djs-builder");
const data = await GetUser(message);
if (!data) return message.reply("โ Could not find the user.");
const member = data.user;
const args = data.args;
const reason = args.join(" ") || "No reason provided";
await member.ban({ reason });
message.reply(`๐ซ ${member.user.tag} was banned for: ${reason}`);
๐น Returns
{
user: <GuildMember>,
args: [ "arg1", "arg2" ]
}
๐น Detection Methods
- Mention:
!ban @Ahmed Spamming
- User ID:
!ban 123456789012345678 Spamming
- Reply:
Reply to user's message with !ban
๐น Notes
- Automatically handles missing users
- Returns
null
if user not found
- Works in any text channel of the guild
Logging System ๐ก๏ธ
The 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!
โจ Features
- ๐ Messages โ Deleted & edited messages are logged with details.
- ๐ Channels โ Creation, deletion, and updates are tracked.
- ๐ญ Roles โ Created, deleted, and updated roles, including member role changes.
- ๐๏ธ Voice State โ Joins, leaves, and moves between channels.
- ๐ Invites โ Created invites & usage tracking.
- ๐ Emojis & Stickers โ Added, removed, or updated.
- ๐จ Audit Log Integration โ Fetches the executor (who did what).
- ๐จ Beautiful Embeds โ Every log is shown in a clean, styled embed with timestamps.
โ๏ธ Setup Example
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",
"CHANNEL_ID"
);
},
};
๐ก How It Works
- โ
Pass your Client, Guild ID, and Log Channel ID.
- ๐ Instantly starts tracking events and sending them to the log channel.
- ๐งฐ No extra setup required โ plug and play!
Level System ๐
๐ Level System โ XP, Levels & Leaderboard
The Level System module lets you track user experience points (XP) in text ๐ฌ and voice ๐๏ธ, handle level-ups โฌ๏ธ, and display leaderboards ๐
.
Perfect for gamifying your Discord server! ๐ฎโจ
๐ฆ Module Exports
const { addXP, UserLevel, leaderboard } = require("djs-builder");
addXP(userId, guildId, options)
โ Adds XP for a user and handles level-ups ๐ฒ.
UserLevel(userId, guildId)
โ Fetch a user's XP and level ๐ค.
leaderboard(guildId, type, limit)
โ Get top users ๐
.
๐ฒ addXP โ Add Experience Points
Adds XP to a user and automatically handles level-ups.
const result = await addXP("USER_ID", "GUILD_ID", {
type: "text",
minXP: 5,
maxXP: 15,
amount_add: 10,
level_add: 1,
});
console.log(result);
๐งโ๐คโ๐ง UserLevel โ Fetch User Data
Fetch a user's text XP, voice XP, total XP, and current level.
const data = await UserLevel("USER_ID", "GUILD_ID");
console.log(data);
Returns default values if the user is not found.
๐
Leaderboard โ Top Users
Get a sorted list of users based on XP or level.
const topUsers = await leaderboard("GUILD_ID", "totalXP", 5);
console.log(topUsers);
Parameters:
guildId
โ Server ID ๐
type
โ "totalXP"
, "text"
๐ฌ, "voice"
๐๏ธ, or "level"
โฌ๏ธ. Default = "totalXP"
limit
โ Number of top users to return ๐ข. Default = 10
โก Practical Example: messageCreate Event
const { addXP, UserLevel, leaderboard } = require("djs-builder");
module.exports = {
name: "messageCreate",
run: async (msg, client) => {
if (msg.author.bot) return;
const result = await addXP(msg.author.id, msg.guild.id, {
type: "text",
minXP: 5,
maxXP: 15,
});
if (result.leveledUp) {
msg.channel.send(
`๐ ${msg.author} new level **${result.newLevel}** โฌ๏ธ`
);
}
if (msg.content === "!rank") {
const data = await UserLevel(msg.author.id, msg.guild.id);
msg.reply(`๐ **level ** ${data.level} โฌ๏ธ โ **XP:** ${data.totalXP} โญ`);
}
if (msg.content === "!top") {
const lb = await leaderboard(msg.guild.id, "totalXP", 5);
msg.reply(
lb
.map(
(u, i) =>
`#${i + 1} <@${u.userId}> โ Lv.${u.level} โฌ๏ธ (${u.totalXP} โญ)`
)
.join("\n")
);
}
},
};
๐ก Notes & Tips
- ๐ฌ Text XP โ Add XP for messages automatically.
- ๐๏ธ Voice XP โ Add XP for voice activity.
- โฌ๏ธ Level Up โ Trigger notifications when leveling up.
- ๐
Leaderboard โ Display the top users in server using embeds for better look.
- ๐ฎ Gamify your server easily with XP rewards, mini-games, and custom commands.
โก Commands & Events
๐ก Commands & Events made easy!
With djs-builder
, handling commands and events is smooth, fast, and fully customizable.
You get built-in features like:
- โ ๏ธ Anti-crash protection โ your bot wonโt crash unexpectedly.
- โณ Cooldowns โ prevent spam and control usage.
- ๐ก๏ธ Permissions & owner/dev only checks โ secure your commands.
- โก Fast Use & custom prefixes โ run commands easily across guilds.
- ๐ Logging โ track every command usage for prefix or slash.
Below are all the available properties you can use for your commands and events:
โก Commands & Events Options
โก COMMAND OPTIONS (Prefix & Slash)
name: 'string',
aliases: ['string'],
description: 'string',
cooldown: 5,
Permissions: ['ADMINISTRATOR'],
ownerOnly: true,
devOnly: true,
guildOnly: true,
dmOnly: true,
fastUse: true,
run: Function,
execute: Function,
โก EVENT OPTIONS
name: 'string',
once: true,
run: Function,
execute: Function
๐ก Tip: Use these properties to fully control command behavior, access, and event handling.
๐ Support
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:
