Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
"keyWords": ["radio", "zamrock", "psychedelic", "blues", "rock"]
}
},
"radio": [

],
"radio": [],
"cache": {
"guilds": {
"enabled": true,
Expand All @@ -45,13 +43,18 @@
"helpCatalog": true,
"helpPagination": true,
"mapMembers": true,
"db": "mongo/mysql",
"mysql": {
"host": "your-mysql-host.com",
"port": 3306,
"user": "youruser",
"password": "password of your user",
"database": "name of the target database"
},
"mongodb": {
"uri": "mongodb://localhost:27017",
"database": "your_bot_database"
},
"rbl": "Your token for revoltbots.org; optional",
"webPort": 80,
"dashboardUrl": "The url the dashboard is accessible with.",
Expand All @@ -72,4 +75,4 @@
"owners": ["not necessary unless you want to use testing commands", "another user id"],
"playerAFKTimeout": 60000,
"Comment": "The above specifies the time in ms after which a player goes inactive; Optional"
}
}
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const { Revoice } = require("revoice.js");
const { Client } = require("revolt.js");
const path = require("path");
const fs = require("fs");
const { SettingsManager, RemoteSettingsManager } = require("./settings/Settings.js");
const dns = require('node:dns');
const { createSettingsManager } = require("./settings/Settings.js");
if (!process.execArgv.includes("--inspect")) require('console-stamp')(console, 'HH:MM:ss.l');
const YTDlpWrap = require("yt-dlp-wrap-extended").default;
const { Innertube, Platform } = require("youtubei.js");
Expand Down Expand Up @@ -43,8 +44,9 @@ class Remix {
this.settingsMgr.loadDefaultsSync("./storage/defaults.json");*/
// updated settings manager based on a mysql database:
// TODO: add self-hosting instr
this.settingsMgr = new RemoteSettingsManager(this.config.mysql, "./storage/defaults.json");

// Pass the URI and the Database name from your new mongodb config block
dns.setDefaultResultOrder('ipv4first');
this.settingsMgr = createSettingsManager(this.config, "./storage/defaults.json");
this.uploader = new Uploader(this.client);

this.geniusClient = new Genius.Client(this.config.geniusToken);
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"genius-lyrics": "^4.4.3",
"i18next": "^23.1.0",
"i18next-fs-backend": "^2.1.5",
"mongodb": "^7.1.0",
"mysql": "^2.18.1",
"prism-media": "^1.3.5",
"revoice.js": "^0.2.168",
Expand Down Expand Up @@ -43,3 +44,4 @@
"defaultsSync": "node index.js sreload"
}
}

Loading