Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDavid30 authored Jun 13, 2022
1 parent 820388d commit edac710
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 0 deletions.
33 changes: 33 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require("dotenv").config();
require("module-alias/register");

const path = require("path");
const { startupCheck } = require("@utils/botUtils");
const { BotClient } = require("@src/structures");

global.__appRoot = path.resolve(__dirname);

// initialize client
const client = new BotClient();
client.loadCommands("src/commands");
client.loadContexts("src/contexts");
client.loadEvents("src/events");


// find unhandled promise rejections
process.on("unhandledRejection", (err) => client.logger.error(`Unhandled exception`, err));

(async () => {
await startupCheck();
if (client.config.DASHBOARD.enabled) {
client.logger.log("Launching dashboard");
try {
const { launch } = require("@root/dashboard/app");
await launch(client);
} catch (ex) {
client.logger.error("Failed to launch dashboard", ex);
}
}
await client.initializeMongoose();
await client.login(process.env.BOT_TOKEN);
})();
96 changes: 96 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
module.exports = {
OWNER_IDS: ["786913832714240000", "682981714523586606"], // Bot owner ID's
PREFIX: "q", // Default prefix for the bot
SUPPORT_SERVER: "https://discord.gg/vckxkeBJqG", // Your bot support server
PRESENCE: {
ENABLED: true, // Whether or not the bot should update its status
STATUS: "online", // The bot's status [online, idle, dnd, invisible]
TYPE: "WATCHING", // Status type for the bot [PLAYING | LISTENING | WATCHING | COMPETING]
MESSAGE: "{members} members in {servers} servers", // Your bot status message
},
DASHBOARD: {
enabled: false, // enable or disable dashboard
baseURL: "https://discord-js-bot.chan-daviddavid.repl.co", // base url
failureURL: "https://discord-js-bot.chan-daviddavid.repl.co", // failure redirect url
port: "8080", // port to run the bot on
},
INTERACTIONS: {
SLASH: true, // Should the interactions be enabled
CONTEXT: true, // Should contexts be enabled
GLOBAL: true, // Should the interactions be registered globally
TEST_GUILD_ID: "934047845064011826", // Guild ID where the interactions should be registered. [** Test you commands here first **]
},
XP_SYSTEM: {
COOLDOWN: 5, // Cooldown in seconds between messages
DEFAULT_LVL_UP_MSG: "{m}, You just advanced to **Level {l}**",
},
MISCELLANEOUS: {
DAILY_COINS: 100, // coins to be received by daily command
},
ECONOMY: {
CURRENCY: "⏣",
DAILY_COINS: 100, // coins to be received by daily command
MIN_BEG_AMOUNT: 100, // minimum coins to be received when beg command is used
MAX_BEG_AMOUNT: 2500, // maximum coins to be received when beg command is used
},
IMAGE: {
BASE_API: "https://image-api.strangebot.xyz",
},
MUSIC: {
IDLE_TIME: 60, // Time in seconds before the bot disconnects from the voice channel
MAX_SEARCH_RESULTS: 5,
NODES: [


{

host: "n2.luxxy.host",

port: 1922,

password: "youshallnotpass",

identifier: "USA Link",

retryDelay: 5000,

secure: false,

},

],

},
/* Bot Embed Colors */
EMBED_COLORS: {
BOT_EMBED: "#068ADD",
TRANSPARENT: "#36393F",
SUCCESS: "#00A56A",
ERROR: "#D61A3C",
WARNING: "#F7E919",
AUTOMOD: "#36393F",
TICKET_CREATE: "#068ADD",
TICKET_CLOSE: "#068ADD",
TIMEOUT_LOG: "#102027",
UNTIMEOUT_LOG: "#4B636E",
KICK_LOG: "#FF7961",
SOFTBAN_LOG: "#AF4448",
BAN_LOG: "#D32F2F",
VMUTE_LOG: "#102027",
VUNMUTE_LOG: "#4B636E",
DEAFEN_LOG: "#102027",
UNDEAFEN_LOG: "#4B636E",
DISCONNECT_LOG: "RANDOM",
MOVE_LOG: "RANDOM",
GIVEAWAYS: "#FF468A",
},
/* Maximum number of keys that can be stored */
CACHE_SIZE: {
GUILDS: 100,
USERS: 1000,
MEMBERS: 1000,
},
MESSAGES: {
API_ERROR: "Unexpected Backend Error! Try again later or contact support server",
},
};
16 changes: 16 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"baseUrl": "./",
"paths": {
"@root/*": ["./*"],
"@commands/*": ["./src/commands/*"],
"@features/*": ["./src/features/*"],
"@schemas/*": ["./src/schemas/*"],
"@src/*": ["./src/*"],
"@utils/*": ["./src/utils/*"]
}
},
"exclude": ["node_modules", "**/node_modules/*"]
}

0 comments on commit edac710

Please sign in to comment.