Skip to main content

intro

READ THIS!

⚠️ Important Update ⚠️

Due to school commitments, this bot is no longer actively maintained. New updates and support are on hold. Please click here for more information.

Documentation

Let's embark on an exciting journey of discovering how to use the bot to its full potential!

💫 - Getting Started

To get started, run the following commands in your terminal

 git clone https://github.com/josephistired/DiscordBot-v14.git
cd DiscordBot-v14
npm install

🔧 - Prerequisites

  • Node.js LTS version 18.50 or above:
    • When installing Node.js, it is highly recommended that you check all checkboxes related to dependencies to ensure that all necessary components are properly installed.
  • Mongo DB:
    • Follow the comprehensive step-by-step video tutorial from Lyxcode to set up your Mongo DB.
READ THIS!

Protecting your MongoDb link is of utmost importance as it is essentially the key to your database. Sharing it with anyone can lead to severe consequences such as deletion, modification or even complete lockout from your own database.

To ensure your database is secure, it's advised to keep the MongoDb link confidential and not share it with anyone. If you suspect that your link has been compromised, taking immediate action such as changing your database password is recommended to prevent any unauthorized access to your precious data.

  • Discord Account Token:
    1. Launch Discord and click on the gear icon located in the lower-left corner to access User Settings.
    2. In the "Advanced" section, enable "Developer Mode" by toggling it on.
    3. Locate your username in any chat window or channel list and right-click on it.
    4. Click on "Copy ID" from the options that appear to copy your Discord account ID to your clipboard.
  • Discord Bot Token:
    1. Start by clicking on the "New Application" button in the Discord Developer Portal.
    2. Give your application a meaningful name and click "Create" to proceed.
    3. Next, navigate to the "Bot" tab and click "Add Bot" to create a new bot user for your application.
    4. If you want others to be able to invite your bot, make sure to tick the "Public Bot" option.
    5. Copy the token using the “Copy” button.
    6. Finally, copy your bot token using the "Copy" button to start using it in your bot's code.
READ THIS!

The Discord bot token serves as the password for your bot and should never be shared with anyone. If an unauthorized user gains access to your token, they can execute harmful actions such as banning members, leaving servers, or pinging everyone. This makes it crucial to keep your token secure and private.

If your token is ever compromised or accidentally leaked, it's vital to act quickly. You can revoke your old token and generate a new one by clicking the "Reset Token" button. After obtaining the new token, use it to log in and ensure the protection of your bot.

  • Server Members Intent and Message Content Intent, Presence Intent Enabled

    • Firstly, you will need to enable the Server Members Intent and Message Content Intent, as well as the Presence Intent. These are considered "privileged intents" and are necessary for your bot to receive information about server members and their presence, as well as message content. You can refer to this tutorial on how to enable these intents
  • Application Commands Checked

    • Secondly, you should ensure that your application commands are checked. This will allow your bot to receive and process user commands, making it more interactive and functional.

⚙️ - Configuration

To properly run the bot, it is necessary to declare some variables in the .env file. Before proceeding, please make sure to remove the ".example" part of the file name so that it is named simply ".env".

.env
TOKEN= Discord Bot Token Here
DATABASEURL= Database URL Here
DEVELOPERID= Discord ID Here
DEFAULT_COOLDOWN= Cooldown in Milliseconds

If you want the /whois command to work properly, it's necessary to upload all the emojis located in the /Emojis folder to your Discord server and obtain their respective IDs. You can get an emoji's ID by typing a backslash followed by the emoji in a chat box. Once you have all the IDs, you need to replace the placeholders in the who.js file with your own IDs. It's important to use your own IDs, and not the ones shown in the example.

/Commands/Public/Utilities/whois.js
function addBadges(badgeNames) {
if (!badgeNames.length) return ["X"];
const badgeMap = {
ActiveDeveloper: "<:activedeveloper:1086315311973802004>",
BugHunterLevel1: "<:discordbughunter1:1086315317241852025>",
BugHunterLevel2: "<:discordbughunter2:1086315319343198288> ",
PremiumEarlySupporter: "<:discordearlysupporter:1086315320622448822>",
Partner: "<:discordpartner:1086315326578368532>",
Staff: "<:discordstaff:1086315331070476288>",
HypeSquadOnlineHouse1: "<:hypesquadbravery:1086315334815993856>", // bravery
HypeSquadOnlineHouse2: "<:hypesquadbrilliance:1086315653927030864>", // brilliance
HypeSquadOnlineHouse3: "<:hypesquadbalance:1086315333498978383>", // balance
Hypesquad: "<:hypesquadevents:1086315338569879605>",
CertifiedModerator: "<:discordmod:1086315323067748432>",
VerifiedDeveloper: "<:discordbotdev:1086315315836764250>",
};

return badgeNames.map((badgeName) => badgeMap[badgeName] || "❓");
}
tip

If you're having trouble setting up the /whois command, Lyxcode has created a helpful video tutorial that you can follow. The video starts at the specific point where they demonstrate setting up the command, so you can easily follow along.

🎊 - Starting The Bot

If you have completed all the previous steps without any issues, your bot is now ready to be launched.

🪟 - Windows

  • If you are using Windows, you can run the bot by double-clicking on the bot.bat file. This will start the bot and you can start using its features. If you encounter any issues or need further assistance, you can create issue on Github.

🐧 - Linux

  • If you are using Linux, you can simply run the node . command while in the root directory in terminal. This will start the bot and you can start using its features. If you encounter any issues or need further assistance, you can create issue on Github.

💻 - Raspberry Pi

  • If you are using a Raspberry Pi simply run nohup node . command while in the root directory in terminal. This will start the bot and you can start using its features. If you encounter any issues or need further assistance, you can create issue on Github.