From e7401485811c0f6e4bb31581d5da54c59c8c1304 Mon Sep 17 00:00:00 2001 From: Mustafa Sayyed Date: Sun, 21 Sep 2025 04:45:24 +0530 Subject: [PATCH] Simplify Folder Structure --- bot/.env.example => .env.example | 0 bot/package.json | 26 --------- {bot/commands => commands}/ai/aiassistant.js | 2 +- {bot/commands => commands}/ai/faq.js | 2 +- {bot/commands => commands}/ai/faq.txt | 0 .../antimodules/antiraid.js | 2 +- {bot/commands => commands}/economy/bal.js | 2 +- {bot/commands => commands}/economy/buy.js | 2 +- .../commands => commands}/economy/coinflip.js | 2 +- {bot/commands => commands}/economy/collect.js | 2 +- {bot/commands => commands}/economy/deposit.js | 2 +- .../commands => commands}/economy/diceroll.js | 2 +- .../economy/economy-setup.js | 2 +- {bot/commands => commands}/economy/give.js | 2 +- .../economy/leaderboard.js | 2 +- {bot/commands => commands}/economy/shop.js | 2 +- .../economy/shopadmin.js | 2 +- {bot/commands => commands}/economy/steal.js | 2 +- .../commands => commands}/economy/withdraw.js | 2 +- {bot/commands => commands}/economy/work.js | 2 +- {bot/commands => commands}/fun/8ball.js | 0 {bot/commands => commands}/fun/avatar.js | 0 {bot/commands => commands}/fun/inspire.js | 0 {bot/commands => commands}/fun/meme.js | 0 {bot/commands => commands}/fun/poll.js | 0 {bot/commands => commands}/fun/reminder.js | 0 {bot/commands => commands}/fun/roll.js | 0 {bot/commands => commands}/fun/secret.js | 0 {bot/commands => commands}/general/banner.js | 0 .../commands => commands}/general/birthday.js | 2 +- .../commands => commands}/general/botstats.js | 0 .../general/calculate.js | 0 {bot/commands => commands}/general/dm.js | 0 .../commands => commands}/general/feedback.js | 0 {bot/commands => commands}/general/help.js | 0 .../commands => commands}/general/joindate.js | 0 {bot/commands => commands}/general/ping.js | 0 .../general/resetnick.js | 0 {bot/commands => commands}/general/reverse.js | 0 .../general/serverinfo.js | 0 {bot/commands => commands}/general/setnick.js | 0 {bot/commands => commands}/general/spoiler.js | 0 {bot/commands => commands}/general/uptime.js | 0 .../commands => commands}/general/userinfo.js | 0 {bot/commands => commands}/moderation/ban.js | 0 {bot/commands => commands}/moderation/kick.js | 0 .../commands => commands}/moderation/purge.js | 0 .../moderation/ticket.js | 2 +- .../moderation/ticketdashboard.js | 2 +- .../truth-or-dare/truthordare.js | 2 +- {bot/commands => commands}/xp/daily.js | 2 +- {bot/commands => commands}/xp/points.js | 2 +- {bot/commands => commands}/xp/profile.js | 2 +- {bot/commands => commands}/xp/roles.js | 2 +- {bot/commands => commands}/xp/xpconfig.js | 2 +- bot/deploy-commands.js => deploy-commands.js | 1 - {bot/events => events}/guildMemberAdd.js | 2 +- {bot/events => events}/helpInteraction.js | 0 {bot/events => events}/interactionCreate.js | 2 +- {bot/events => events}/messageCreate.js | 4 +- {bot/events => events}/modalCreate.js | 2 +- {bot/events => events}/ready.js | 0 {bot/events => events}/voiceStateUpdate.js | 2 +- bot/index.js => index.js | 5 +- {server/models => models}/schemas.js | 0 package.json | 56 ++++++++++++++++--- server/index.js | 12 ---- server/package.json | 9 --- bot/setup.bat => setup.bat | 0 {server/utils => utils}/database.js | 2 +- {server/utils => utils}/helpers.js | 0 {server/utils => utils}/moderation.js | 0 {server/utils => utils}/scheduler.js | 2 +- 73 files changed, 84 insertions(+), 93 deletions(-) rename bot/.env.example => .env.example (100%) delete mode 100644 bot/package.json rename {bot/commands => commands}/ai/aiassistant.js (99%) rename {bot/commands => commands}/ai/faq.js (98%) rename {bot/commands => commands}/ai/faq.txt (100%) rename {bot/commands => commands}/antimodules/antiraid.js (98%) rename {bot/commands => commands}/economy/bal.js (97%) rename {bot/commands => commands}/economy/buy.js (97%) rename {bot/commands => commands}/economy/coinflip.js (97%) rename {bot/commands => commands}/economy/collect.js (98%) rename {bot/commands => commands}/economy/deposit.js (97%) rename {bot/commands => commands}/economy/diceroll.js (97%) rename {bot/commands => commands}/economy/economy-setup.js (98%) rename {bot/commands => commands}/economy/give.js (97%) rename {bot/commands => commands}/economy/leaderboard.js (97%) rename {bot/commands => commands}/economy/shop.js (96%) rename {bot/commands => commands}/economy/shopadmin.js (98%) rename {bot/commands => commands}/economy/steal.js (98%) rename {bot/commands => commands}/economy/withdraw.js (97%) rename {bot/commands => commands}/economy/work.js (98%) rename {bot/commands => commands}/fun/8ball.js (100%) rename {bot/commands => commands}/fun/avatar.js (100%) rename {bot/commands => commands}/fun/inspire.js (100%) rename {bot/commands => commands}/fun/meme.js (100%) rename {bot/commands => commands}/fun/poll.js (100%) rename {bot/commands => commands}/fun/reminder.js (100%) rename {bot/commands => commands}/fun/roll.js (100%) rename {bot/commands => commands}/fun/secret.js (100%) rename {bot/commands => commands}/general/banner.js (100%) rename {bot/commands => commands}/general/birthday.js (99%) rename {bot/commands => commands}/general/botstats.js (100%) rename {bot/commands => commands}/general/calculate.js (100%) rename {bot/commands => commands}/general/dm.js (100%) rename {bot/commands => commands}/general/feedback.js (100%) rename {bot/commands => commands}/general/help.js (100%) rename {bot/commands => commands}/general/joindate.js (100%) rename {bot/commands => commands}/general/ping.js (100%) rename {bot/commands => commands}/general/resetnick.js (100%) rename {bot/commands => commands}/general/reverse.js (100%) rename {bot/commands => commands}/general/serverinfo.js (100%) rename {bot/commands => commands}/general/setnick.js (100%) rename {bot/commands => commands}/general/spoiler.js (100%) rename {bot/commands => commands}/general/uptime.js (100%) rename {bot/commands => commands}/general/userinfo.js (100%) rename {bot/commands => commands}/moderation/ban.js (100%) rename {bot/commands => commands}/moderation/kick.js (100%) rename {bot/commands => commands}/moderation/purge.js (100%) rename {bot/commands => commands}/moderation/ticket.js (99%) rename {bot/commands => commands}/moderation/ticketdashboard.js (99%) rename {bot/commands => commands}/truth-or-dare/truthordare.js (99%) rename {bot/commands => commands}/xp/daily.js (98%) rename {bot/commands => commands}/xp/points.js (99%) rename {bot/commands => commands}/xp/profile.js (99%) rename {bot/commands => commands}/xp/roles.js (99%) rename {bot/commands => commands}/xp/xpconfig.js (99%) rename bot/deploy-commands.js => deploy-commands.js (99%) rename {bot/events => events}/guildMemberAdd.js (98%) rename {bot/events => events}/helpInteraction.js (100%) rename {bot/events => events}/interactionCreate.js (99%) rename {bot/events => events}/messageCreate.js (98%) rename {bot/events => events}/modalCreate.js (99%) rename {bot/events => events}/ready.js (100%) rename {bot/events => events}/voiceStateUpdate.js (98%) rename bot/index.js => index.js (98%) rename {server/models => models}/schemas.js (100%) delete mode 100644 server/index.js delete mode 100644 server/package.json rename bot/setup.bat => setup.bat (100%) rename {server/utils => utils}/database.js (99%) rename {server/utils => utils}/helpers.js (100%) rename {server/utils => utils}/moderation.js (100%) rename {server/utils => utils}/scheduler.js (99%) diff --git a/bot/.env.example b/.env.example similarity index 100% rename from bot/.env.example rename to .env.example diff --git a/bot/package.json b/bot/package.json deleted file mode 100644 index c86f6d8..0000000 --- a/bot/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@adb/bot", - "version": "1.0.1", - "main": "index.js", - "scripts": { - "dev": "nodemon index.js", - "start": "node index.js", - "deploy": "node deploy-commands.js" - }, - "dependencies": { - "@adb/server": "1.0.0", - "@discordjs/rest": "^2.2.0", - "@google/genai": "^1.16.0", - "axios": "^1.6.8", - "discord-api-types": "^0.37.71", - "discord.js": "^14.14.1", - "dotenv": "^16.4.5", - "glob": "^10.3.10", - "mathjs": "^12.4.1", - "mongoose": "^8.2.4", - "ms": "^2.1.3", - "node-cron": "^3.0.3", - "nodemon": "^3.1.10", - "openai": "^4.29.2" - } -} diff --git a/bot/commands/ai/aiassistant.js b/commands/ai/aiassistant.js similarity index 99% rename from bot/commands/ai/aiassistant.js rename to commands/ai/aiassistant.js index fc25590..c07316b 100644 --- a/bot/commands/ai/aiassistant.js +++ b/commands/ai/aiassistant.js @@ -7,7 +7,7 @@ const { MessageFlags, } = require("discord.js"); const { GoogleGenAI } = require("@google/genai"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); // Initialize Gemini AI const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }); diff --git a/bot/commands/ai/faq.js b/commands/ai/faq.js similarity index 98% rename from bot/commands/ai/faq.js rename to commands/ai/faq.js index 7b0cf0c..7ea04f9 100644 --- a/bot/commands/ai/faq.js +++ b/commands/ai/faq.js @@ -2,7 +2,7 @@ const fs = require("fs"); const path = require("path"); const { GoogleGenAI } = require("@google/genai"); const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }); diff --git a/bot/commands/ai/faq.txt b/commands/ai/faq.txt similarity index 100% rename from bot/commands/ai/faq.txt rename to commands/ai/faq.txt diff --git a/bot/commands/antimodules/antiraid.js b/commands/antimodules/antiraid.js similarity index 98% rename from bot/commands/antimodules/antiraid.js rename to commands/antimodules/antiraid.js index 9fba9ca..fb3fc62 100644 --- a/bot/commands/antimodules/antiraid.js +++ b/commands/antimodules/antiraid.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/bal.js b/commands/economy/bal.js similarity index 97% rename from bot/commands/economy/bal.js rename to commands/economy/bal.js index 30f56a5..5aa1111 100644 --- a/bot/commands/economy/bal.js +++ b/commands/economy/bal.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/buy.js b/commands/economy/buy.js similarity index 97% rename from bot/commands/economy/buy.js rename to commands/economy/buy.js index c947ece..aeca6ce 100644 --- a/bot/commands/economy/buy.js +++ b/commands/economy/buy.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/coinflip.js b/commands/economy/coinflip.js similarity index 97% rename from bot/commands/economy/coinflip.js rename to commands/economy/coinflip.js index 5878845..72be361 100644 --- a/bot/commands/economy/coinflip.js +++ b/commands/economy/coinflip.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/collect.js b/commands/economy/collect.js similarity index 98% rename from bot/commands/economy/collect.js rename to commands/economy/collect.js index 72eac49..7787021 100644 --- a/bot/commands/economy/collect.js +++ b/commands/economy/collect.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder ,MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/deposit.js b/commands/economy/deposit.js similarity index 97% rename from bot/commands/economy/deposit.js rename to commands/economy/deposit.js index cf918e3..d2bb8f0 100644 --- a/bot/commands/economy/deposit.js +++ b/commands/economy/deposit.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/diceroll.js b/commands/economy/diceroll.js similarity index 97% rename from bot/commands/economy/diceroll.js rename to commands/economy/diceroll.js index 1261de1..16e0ba6 100644 --- a/bot/commands/economy/diceroll.js +++ b/commands/economy/diceroll.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/economy-setup.js b/commands/economy/economy-setup.js similarity index 98% rename from bot/commands/economy/economy-setup.js rename to commands/economy/economy-setup.js index 92ca1f1..261ac7c 100644 --- a/bot/commands/economy/economy-setup.js +++ b/commands/economy/economy-setup.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/give.js b/commands/economy/give.js similarity index 97% rename from bot/commands/economy/give.js rename to commands/economy/give.js index f5d7a9c..ef14f59 100644 --- a/bot/commands/economy/give.js +++ b/commands/economy/give.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/leaderboard.js b/commands/economy/leaderboard.js similarity index 97% rename from bot/commands/economy/leaderboard.js rename to commands/economy/leaderboard.js index 4a0e114..943e620 100644 --- a/bot/commands/economy/leaderboard.js +++ b/commands/economy/leaderboard.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/shop.js b/commands/economy/shop.js similarity index 96% rename from bot/commands/economy/shop.js rename to commands/economy/shop.js index 2f3fb22..1fb28e4 100644 --- a/bot/commands/economy/shop.js +++ b/commands/economy/shop.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/shopadmin.js b/commands/economy/shopadmin.js similarity index 98% rename from bot/commands/economy/shopadmin.js rename to commands/economy/shopadmin.js index f89e192..046f5e4 100644 --- a/bot/commands/economy/shopadmin.js +++ b/commands/economy/shopadmin.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/steal.js b/commands/economy/steal.js similarity index 98% rename from bot/commands/economy/steal.js rename to commands/economy/steal.js index 242de5d..5fdbb03 100644 --- a/bot/commands/economy/steal.js +++ b/commands/economy/steal.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, Collection, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); // Cooldown collection to prevent spam const stealCooldowns = new Collection(); diff --git a/bot/commands/economy/withdraw.js b/commands/economy/withdraw.js similarity index 97% rename from bot/commands/economy/withdraw.js rename to commands/economy/withdraw.js index 21a57de..34abd34 100644 --- a/bot/commands/economy/withdraw.js +++ b/commands/economy/withdraw.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/economy/work.js b/commands/economy/work.js similarity index 98% rename from bot/commands/economy/work.js rename to commands/economy/work.js index 37b9f7b..4b2341a 100644 --- a/bot/commands/economy/work.js +++ b/commands/economy/work.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder, Collection, MessageFlags } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); // Cooldown collection specifically for this command const workCooldowns = new Collection(); diff --git a/bot/commands/fun/8ball.js b/commands/fun/8ball.js similarity index 100% rename from bot/commands/fun/8ball.js rename to commands/fun/8ball.js diff --git a/bot/commands/fun/avatar.js b/commands/fun/avatar.js similarity index 100% rename from bot/commands/fun/avatar.js rename to commands/fun/avatar.js diff --git a/bot/commands/fun/inspire.js b/commands/fun/inspire.js similarity index 100% rename from bot/commands/fun/inspire.js rename to commands/fun/inspire.js diff --git a/bot/commands/fun/meme.js b/commands/fun/meme.js similarity index 100% rename from bot/commands/fun/meme.js rename to commands/fun/meme.js diff --git a/bot/commands/fun/poll.js b/commands/fun/poll.js similarity index 100% rename from bot/commands/fun/poll.js rename to commands/fun/poll.js diff --git a/bot/commands/fun/reminder.js b/commands/fun/reminder.js similarity index 100% rename from bot/commands/fun/reminder.js rename to commands/fun/reminder.js diff --git a/bot/commands/fun/roll.js b/commands/fun/roll.js similarity index 100% rename from bot/commands/fun/roll.js rename to commands/fun/roll.js diff --git a/bot/commands/fun/secret.js b/commands/fun/secret.js similarity index 100% rename from bot/commands/fun/secret.js rename to commands/fun/secret.js diff --git a/bot/commands/general/banner.js b/commands/general/banner.js similarity index 100% rename from bot/commands/general/banner.js rename to commands/general/banner.js diff --git a/bot/commands/general/birthday.js b/commands/general/birthday.js similarity index 99% rename from bot/commands/general/birthday.js rename to commands/general/birthday.js index 41f019f..a5163ce 100644 --- a/bot/commands/general/birthday.js +++ b/commands/general/birthday.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/general/botstats.js b/commands/general/botstats.js similarity index 100% rename from bot/commands/general/botstats.js rename to commands/general/botstats.js diff --git a/bot/commands/general/calculate.js b/commands/general/calculate.js similarity index 100% rename from bot/commands/general/calculate.js rename to commands/general/calculate.js diff --git a/bot/commands/general/dm.js b/commands/general/dm.js similarity index 100% rename from bot/commands/general/dm.js rename to commands/general/dm.js diff --git a/bot/commands/general/feedback.js b/commands/general/feedback.js similarity index 100% rename from bot/commands/general/feedback.js rename to commands/general/feedback.js diff --git a/bot/commands/general/help.js b/commands/general/help.js similarity index 100% rename from bot/commands/general/help.js rename to commands/general/help.js diff --git a/bot/commands/general/joindate.js b/commands/general/joindate.js similarity index 100% rename from bot/commands/general/joindate.js rename to commands/general/joindate.js diff --git a/bot/commands/general/ping.js b/commands/general/ping.js similarity index 100% rename from bot/commands/general/ping.js rename to commands/general/ping.js diff --git a/bot/commands/general/resetnick.js b/commands/general/resetnick.js similarity index 100% rename from bot/commands/general/resetnick.js rename to commands/general/resetnick.js diff --git a/bot/commands/general/reverse.js b/commands/general/reverse.js similarity index 100% rename from bot/commands/general/reverse.js rename to commands/general/reverse.js diff --git a/bot/commands/general/serverinfo.js b/commands/general/serverinfo.js similarity index 100% rename from bot/commands/general/serverinfo.js rename to commands/general/serverinfo.js diff --git a/bot/commands/general/setnick.js b/commands/general/setnick.js similarity index 100% rename from bot/commands/general/setnick.js rename to commands/general/setnick.js diff --git a/bot/commands/general/spoiler.js b/commands/general/spoiler.js similarity index 100% rename from bot/commands/general/spoiler.js rename to commands/general/spoiler.js diff --git a/bot/commands/general/uptime.js b/commands/general/uptime.js similarity index 100% rename from bot/commands/general/uptime.js rename to commands/general/uptime.js diff --git a/bot/commands/general/userinfo.js b/commands/general/userinfo.js similarity index 100% rename from bot/commands/general/userinfo.js rename to commands/general/userinfo.js diff --git a/bot/commands/moderation/ban.js b/commands/moderation/ban.js similarity index 100% rename from bot/commands/moderation/ban.js rename to commands/moderation/ban.js diff --git a/bot/commands/moderation/kick.js b/commands/moderation/kick.js similarity index 100% rename from bot/commands/moderation/kick.js rename to commands/moderation/kick.js diff --git a/bot/commands/moderation/purge.js b/commands/moderation/purge.js similarity index 100% rename from bot/commands/moderation/purge.js rename to commands/moderation/purge.js diff --git a/bot/commands/moderation/ticket.js b/commands/moderation/ticket.js similarity index 99% rename from bot/commands/moderation/ticket.js rename to commands/moderation/ticket.js index f187ae1..8fe0cf3 100644 --- a/bot/commands/moderation/ticket.js +++ b/commands/moderation/ticket.js @@ -10,7 +10,7 @@ const { ChannelType, PermissionFlagsBits, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); const { isModeratorOrOwner, generateTicketId, diff --git a/bot/commands/moderation/ticketdashboard.js b/commands/moderation/ticketdashboard.js similarity index 99% rename from bot/commands/moderation/ticketdashboard.js rename to commands/moderation/ticketdashboard.js index 982bc0f..8704f51 100644 --- a/bot/commands/moderation/ticketdashboard.js +++ b/commands/moderation/ticketdashboard.js @@ -7,7 +7,7 @@ const { StringSelectMenuBuilder, PermissionFlagsBits, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); const { isModeratorOrOwner, getPriorityColor, diff --git a/bot/commands/truth-or-dare/truthordare.js b/commands/truth-or-dare/truthordare.js similarity index 99% rename from bot/commands/truth-or-dare/truthordare.js rename to commands/truth-or-dare/truthordare.js index ad0de60..2e2dcdd 100644 --- a/bot/commands/truth-or-dare/truthordare.js +++ b/commands/truth-or-dare/truthordare.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); const defaultTruths = [ "What's the most embarrassing thing that's ever happened to you?", diff --git a/bot/commands/xp/daily.js b/commands/xp/daily.js similarity index 98% rename from bot/commands/xp/daily.js rename to commands/xp/daily.js index b7d5a3a..c1c9099 100644 --- a/bot/commands/xp/daily.js +++ b/commands/xp/daily.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/xp/points.js b/commands/xp/points.js similarity index 99% rename from bot/commands/xp/points.js rename to commands/xp/points.js index 1b14ea9..4f276b7 100644 --- a/bot/commands/xp/points.js +++ b/commands/xp/points.js @@ -1,5 +1,5 @@ const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/xp/profile.js b/commands/xp/profile.js similarity index 99% rename from bot/commands/xp/profile.js rename to commands/xp/profile.js index c48704a..4d33f95 100644 --- a/bot/commands/xp/profile.js +++ b/commands/xp/profile.js @@ -3,7 +3,7 @@ const { EmbedBuilder, AttachmentBuilder, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/xp/roles.js b/commands/xp/roles.js similarity index 99% rename from bot/commands/xp/roles.js rename to commands/xp/roles.js index 627bccb..93b6dcf 100644 --- a/bot/commands/xp/roles.js +++ b/commands/xp/roles.js @@ -6,7 +6,7 @@ const { ButtonBuilder, ButtonStyle, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/commands/xp/xpconfig.js b/commands/xp/xpconfig.js similarity index 99% rename from bot/commands/xp/xpconfig.js rename to commands/xp/xpconfig.js index 156ece5..b0a3ebe 100644 --- a/bot/commands/xp/xpconfig.js +++ b/commands/xp/xpconfig.js @@ -4,7 +4,7 @@ const { PermissionFlagsBits, ChannelType, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../../utils/database"); module.exports = { data: new SlashCommandBuilder() diff --git a/bot/deploy-commands.js b/deploy-commands.js similarity index 99% rename from bot/deploy-commands.js rename to deploy-commands.js index c264659..90d2993 100644 --- a/bot/deploy-commands.js +++ b/deploy-commands.js @@ -1,4 +1,3 @@ -const fs = require('fs'); const { REST, Routes } = require("discord.js"); const { readdirSync } = require("fs"); const path = require("path"); diff --git a/bot/events/guildMemberAdd.js b/events/guildMemberAdd.js similarity index 98% rename from bot/events/guildMemberAdd.js rename to events/guildMemberAdd.js index e22a33f..96643fd 100644 --- a/bot/events/guildMemberAdd.js +++ b/events/guildMemberAdd.js @@ -1,5 +1,5 @@ const { Events, EmbedBuilder, AttachmentBuilder } = require("discord.js"); -const Database = require("@adb/server/utils/database"); +const Database = require("../utils/database"); const { checkRaidDetection } = require("../commands/antimodules/antiraid"); module.exports = { diff --git a/bot/events/helpInteraction.js b/events/helpInteraction.js similarity index 100% rename from bot/events/helpInteraction.js rename to events/helpInteraction.js diff --git a/bot/events/interactionCreate.js b/events/interactionCreate.js similarity index 99% rename from bot/events/interactionCreate.js rename to events/interactionCreate.js index fa7c431..674d71c 100644 --- a/bot/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -10,7 +10,7 @@ const { StringSelectMenuBuilder, } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../utils/database"); module.exports = { name: Events.InteractionCreate, diff --git a/bot/events/messageCreate.js b/events/messageCreate.js similarity index 98% rename from bot/events/messageCreate.js rename to events/messageCreate.js index d38dd8d..2575a32 100644 --- a/bot/events/messageCreate.js +++ b/events/messageCreate.js @@ -1,11 +1,11 @@ const { Events, EmbedBuilder, InteractionType } = require("discord.js"); const { GoogleGenAI } = require("@google/genai"); -const { database: Database } = require("@adb/server"); +const Database = require("../utils/database"); const { sanitizeInput, isQuestion, parseChannelList, -} = require("@adb/server/utils/moderation"); +} = require("../utils/moderation"); // 🤖 Initialize Gemini AI const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY }); diff --git a/bot/events/modalCreate.js b/events/modalCreate.js similarity index 99% rename from bot/events/modalCreate.js rename to events/modalCreate.js index 2addfa3..4015bae 100644 --- a/bot/events/modalCreate.js +++ b/events/modalCreate.js @@ -1,5 +1,5 @@ const { Events, EmbedBuilder } = require("discord.js"); -const Database = require("@adb/server/utils/database"); +const Database = require("../utils/database"); module.exports = { name: Events.InteractionCreate, diff --git a/bot/events/ready.js b/events/ready.js similarity index 100% rename from bot/events/ready.js rename to events/ready.js diff --git a/bot/events/voiceStateUpdate.js b/events/voiceStateUpdate.js similarity index 98% rename from bot/events/voiceStateUpdate.js rename to events/voiceStateUpdate.js index d356479..de2fb0e 100644 --- a/bot/events/voiceStateUpdate.js +++ b/events/voiceStateUpdate.js @@ -1,5 +1,5 @@ const { Events } = require("discord.js"); -const { database: Database } = require("@adb/server"); +const Database = require("../utils/database"); module.exports = { name: Events.VoiceStateUpdate, diff --git a/bot/index.js b/index.js similarity index 98% rename from bot/index.js rename to index.js index 592d1e3..525caac 100644 --- a/bot/index.js +++ b/index.js @@ -8,8 +8,9 @@ const { } = require("discord.js"); const { readdirSync } = require("fs"); const path = require("path"); -const { database: Database } = require("@adb/server/"); -const { scheduler: TaskScheduler } = require("@adb/server"); +const Database = require("./utils/database"); + +const TaskScheduler = require("./utils/scheduler"); require("dotenv").config(); // 🚀 Create VAISH - Ultra Modern Discord Bot diff --git a/server/models/schemas.js b/models/schemas.js similarity index 100% rename from server/models/schemas.js rename to models/schemas.js diff --git a/package.json b/package.json index e672245..9d7c229 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,51 @@ { - "name": "discord-bot-monorepo", - "private": true, - "version": "1.0.0", - "workspaces": [ + "name": "vaish-discord-bot", + "version": "2.0.0", + "description": "VAISH - Ultra-modern AI-powered Discord bot with advanced features and beautiful UI", + "main": "index.js", + "scripts": { + "start": "node index.js", + "dev": "nodemon index.js", + "deploy": "node deploy-commands.js", + "test": "node --test" + }, + "keywords": [ + "discord", "bot", - "server" + "discord.js", + "ai", + "gemini", + "modern", + "VAISH", + "advanced", + "typescript-ready", + "mongodb", + "open-source" ], - "scripts": { - "start": "npm start --workspace=@adb/bot", - "deploy": "npm run deploy --workspace=@adb/bot" + "author": "VAISH Development Team", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/VAISH-bot/discord-bot" + }, + "homepage": "https://VAISH-bot.com", + "bugs": { + "url": "https://github.com/VAISH-bot/discord-bot/issues" + }, + "dependencies": { + "@google/genai": "^1.16.0", + "axios": "^1.6.2", + "discord.js": "^14.14.1", + "dotenv": "^16.3.1", + "express": "^5.1.0", + "mongoose": "^8.0.3", + "ms": "^2.1.3", + "node-cron": "^3.0.3" + }, + "devDependencies": { + "nodemon": "^3.0.2" + }, + "engines": { + "node": ">=16.0.0" } -} \ No newline at end of file +} diff --git a/server/index.js b/server/index.js deleted file mode 100644 index 57c90f5..0000000 --- a/server/index.js +++ /dev/null @@ -1,12 +0,0 @@ -// server/index.js -const Database = require('./utils/database.js'); - -module.exports = { - // Utils - database: new Database(), // Export an instance - scheduler: require('./utils/scheduler.js'), - moderation: require('./utils/moderation.js'), - - // Schemas - schemas: require('./models/schemas.js'), -}; \ No newline at end of file diff --git a/server/package.json b/server/package.json deleted file mode 100644 index 1898e78..0000000 --- a/server/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@adb/server", - "version": "1.0.0", - "main": "index.js", - "dependencies": { - "mongoose": "^8.2.4", - "node-cron": "^3.0.3" - } -} \ No newline at end of file diff --git a/bot/setup.bat b/setup.bat similarity index 100% rename from bot/setup.bat rename to setup.bat diff --git a/server/utils/database.js b/utils/database.js similarity index 99% rename from server/utils/database.js rename to utils/database.js index bce1012..493ab52 100644 --- a/server/utils/database.js +++ b/utils/database.js @@ -34,7 +34,7 @@ class Database { this.ShopItem = ShopItem; } - async getInstance() { + static async getInstance() { if (!Database.instance) { Database.instance = new Database(); await Database.instance.connect(); diff --git a/server/utils/helpers.js b/utils/helpers.js similarity index 100% rename from server/utils/helpers.js rename to utils/helpers.js diff --git a/server/utils/moderation.js b/utils/moderation.js similarity index 100% rename from server/utils/moderation.js rename to utils/moderation.js diff --git a/server/utils/scheduler.js b/utils/scheduler.js similarity index 99% rename from server/utils/scheduler.js rename to utils/scheduler.js index b93ab1c..20cbbd6 100644 --- a/server/utils/scheduler.js +++ b/utils/scheduler.js @@ -1,5 +1,5 @@ const cron = require("node-cron"); -const Database = require("../utils/database"); +const Database = require("./database"); class TaskScheduler { constructor(client) {