Skip to content

Commit

Permalink
Merge pull request #116 from saiteja-madha/v4.2.0-release
Browse files Browse the repository at this point in the history
V4.2.0 release
  • Loading branch information
saiteja-madha authored Mar 26, 2022
2 parents c9e464f + abc75f8 commit 580064c
Show file tree
Hide file tree
Showing 132 changed files with 8,187 additions and 581 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.vscode/
node_modules/
logs/*
package-lock.json
.env
17 changes: 14 additions & 3 deletions bot.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require("dotenv").config();
require("module-alias/register");
require("@src/helpers/extenders");

const path = require("path");
const { startupCheck } = require("@utils/botUtils");
const { validateConfig, checkForUpdates } = require("@utils/botUtils");
const { initializeMongoose } = require("@src/database/mongoose");
const { BotClient } = require("@src/structures");

global.__appRoot = path.resolve(__dirname);
Expand All @@ -17,7 +19,15 @@ client.loadEvents("src/events");
process.on("unhandledRejection", (err) => client.logger.error(`Unhandled exception`, err));

(async () => {
await startupCheck();
validateConfig();

// initialize the database
await initializeMongoose();

// check for updates
await checkForUpdates();

// start the dashboard
if (client.config.DASHBOARD.enabled) {
client.logger.log("Launching dashboard");
try {
Expand All @@ -27,6 +37,7 @@ process.on("unhandledRejection", (err) => client.logger.error(`Unhandled excepti
client.logger.error("Failed to launch dashboard", ex);
}
}
await client.initializeMongoose();

// start the client
await client.login(process.env.BOT_TOKEN);
})();
30 changes: 24 additions & 6 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ module.exports = {
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
},
SUGGESTIONS: {
ENABLED: true, // Should the suggestion system be enabled
EMOJI: {
UP_VOTE: "⬆️",
DOWN_VOTE: "⬇️",
},
DEFAULT_EMBED: "#0099ff",
APPROVED_EMBED: "#00ff00",
DENIED_EMBED: "#ff0000",
},
IMAGE: {
BASE_API: "https://image-api.strangebot.xyz",
},
Expand All @@ -41,10 +51,18 @@ module.exports = {
MAX_SEARCH_RESULTS: 5,
NODES: [
{
host: "lavalink.strangebot.xyz",
port: 80,
password: "strangebot",
identifier: "Strange Link",
host: "ger.lavalink.mitask.tech",
port: 2333,
password: "lvserver",
identifier: "German Link",
retryDelay: 5000,
secure: false,
},
{
host: "usa.lavalink.mitask.tech",
port: 2333,
password: "lvserver",
identifier: "USA Link",
retryDelay: 5000,
secure: false,
},
Expand Down Expand Up @@ -76,8 +94,8 @@ module.exports = {
/* Maximum number of keys that can be stored */
CACHE_SIZE: {
GUILDS: 100,
USERS: 1000,
MEMBERS: 1000,
USERS: 10000,
MEMBERS: 10000,
},
MESSAGES: {
API_ERROR: "Unexpected Backend Error! Try again later or contact support server",
Expand Down
2 changes: 1 addition & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@root/*": ["./*"],
"@commands/*": ["./src/commands/*"],
"@features/*": ["./src/features/*"],
"@schemas/*": ["./src/schemas/*"],
"@schemas/*": ["./src/database/schemas/*"],
"@src/*": ["./src/*"],
"@utils/*": ["./src/utils/*"]
}
Expand Down
Loading

0 comments on commit 580064c

Please sign in to comment.