easyBot is a general-purpose bot built using Revolt.js. It is designed to enhance your server with various features and commands. The only thing you need to configure is the .env! This project is developed for fun and is licensed under the MIT License.
-
🛠️ Utils
Logger
: A better Console Logger used for the bot.Message Logger
: A Message Logger that logs every message sent in the server.
-
👤 User Commands
!help
: Displays a list of available commands.!hallo
: Sends a welcome message.!level
: Displays your current level and experience.!top
: Displays the top users by level and experience.
-
🔧 Admin/Moderator Commands
!ban <username>
: Bans a user from the server.!mute <username> <time>
: Mutes a user in the server.!kick <username>
Kicks a user from the server.!unmute <username>
: Unmutes a user in the server.!eventStart <event>
: Starts a specified event.!standartRole
: Assigns a standard role to all online members.!ping
: Checks the bot's latency.!teamHelp
: Displays a list of team commands.!botMSG <message>
: Sends a message as the bot.!botEmbed <title> <description>
: Sends an embed message as the bot.
-
📅 Events
joinrole
: Automatically assigns a role to new members when they join the server.welcomeMSG
: Sends a welcome message when new users join the server.userLeave
: Deletes user data from the database when they leave, get kicked, or get banned.
-
📥 Install MongoDB: Make sure you have MongoDB installed and running. You can download it from here.
-
⚙️ Configure the .env File: Add your MongoDB URI to the
.env
file.MONGODB_URI = "your_mongodb_uri"
-
💾 Saving User Data: To save user data, use the
saveUserData
function fromsrc/database/utils/user.ts
.import { saveUserData } from '../database/utils/user'; const user = { userId: '123456', username: 'exampleUser', discriminator: '0001', avatar: 'avatar_url', createdAt: new Date(), experience: 0, level: 1 }; await saveUserData(user);
-
🔍 Fetching User Data: To fetch user data, use the
getUserData
function fromsrc/database/utils/user.ts
.import { getUserData } from '../database/utils/user'; const userData = await getUserData({ userId: '123456' }); console.log(userData);
-
🗑️ Deleting User Data: To delete user data, use the
deleteUserData
function fromsrc/database/utils/user.ts
.import { deleteUserData } from '../database/utils/user'; await deleteUserData('123456');
-
📈 Adding Experience: To add experience to a user, use the
addExperience
function fromsrc/database/utils/levelSystem.ts
.import { addExperience } from '../database/utils/levelSystem'; await addExperience('123456', 50);
-
🏅 Fetching User Level: To fetch a user's level, use the
getUserLevel
function fromsrc/database/utils/levelSystem.ts
.import { getUserLevel } from '../database/utils/levelSystem'; const userLevel = await getUserLevel('123456'); console.log(userLevel);
-
📥 Clone the repository:
git clone https://github.com/yourusername/easyBot.git cd easyBot
(you also could download the release and use that BUT the releases are in Javascript not Typescript)
-
📦 Install the dependencies:
npm install
-
⚙️ Create a .env file by copying the .env.template:
cp .env.template .env
-
✏️ Fill in the required values in the .env file:
#BOT RELATED BOT_TOKEN = "" #SERVER RELATED SERVER_ID = "" #ROLES JOIN_ROLE = "" ADMIN_ROLE = "" MODERATOR_ROLE = "" #CHANNELS WELCOME_CHANNEL_ID = "" LOGGING_CHANNEL_ID = "" #USER IDS OWNER_USER_ID = "" #MONGO DB MONGODB_URI = ""
To start the bot in development mode:
npm run dev
To start the bot in production mode:
npm run prod
To Build the Project:
npm run build
Contributions are welcome! Please open an issue or submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please open an issue on GitHub. Or Join the official EasyBot Revolt Server (coming soon)
easyBot - Enhancing your server experience with ease!