The all-in-one bot for moderation, fun, and utility in your Discord server.
Features • Installation • Dependencies • LoggingUltimate Discord Bot is a powerful and flexible bot built using the Discord.js library. It's designed to enhance your Discord server with a wide range of features, from server moderation tools to fun and engaging commands for your community. The bot integrates external APIs for jokes, history facts, and random trivia, making it a versatile tool for any server.
roll [min-max]
: Roll a random number within a given range (default: 1-100).joke
: Fetch a random joke from an external API.who [name]
: Generate a random adjective for the given name.prediction
: Get a random prediction about your future.8ball
: Ask a yes/no question and get an answer.ping
: Check the bot's response time.words [text]
: Count the number of words in the provided text.clear [number]
: Delete up to 100 recent messages in the current channel.
kick [@user]
: Kick a user from the server.ban [@user]
: Ban a user from the server.mute [@user]
: Mute a user in voice channels.unmute [@user]
: Unmute a user in voice channels.
userinfo [@user]
: Get details about a user (username, tag, ID, etc.).serverinfo
: Display server information (name, member count, etc.).random_player
: Select a random member from the server.botinfo
: List all bots currently in the server.
uptime
: See how long the bot has been running.today
: Discover a historical event that occurred on today's date.fact
: Get a random fun fact from an external API.ascii [text]
: Convert text into ASCII art.fortune
: Receive a fortune prediction for your day.
Before running the bot, ensure you have the following:
- A Discord developer account and a bot token.
- Node.js (v16.6.0 or higher) installed on your machine.
-
Clone the repository:
git clone https://github.com/Jesewe/discord-bot.git
-
Navigate to the project directory:
cd discord-bot
-
Install the required dependencies:
npm install
-
Create a
config.json
file in the project root and add your bot token and prefix:{ "token": "YOUR_BOT_TOKEN", "prefix": "!" }
-
Start the bot:
node bot.js
- Discord.js: A JavaScript library to interact with the Discord API.
- Axios: A promise-based HTTP client for making API calls.
- Figlet: Used to generate ASCII art from text.
The bot logs each command execution along with timestamps for easy monitoring. By default, logs are written to both the console and an optional log file if logging is enabled in the config.json
. Example log format:
[MM/DD/YYYY, HH:MM:SS AM/PM] Command executed: !roll
To enable file logging, configure the logFilePath
in config.json
:
{
"logging": {
"enabled": true,
"logFilePath": "./bot.log"
}
}
This project is licensed under the MIT License. See the LICENSE file for details.