aboutsummaryrefslogtreecommitdiff
path: root/bot/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'bot/src/utils')
-rw-r--r--bot/src/utils/i18n.js12
-rw-r--r--bot/src/utils/sync.js9
2 files changed, 20 insertions, 1 deletions
diff --git a/bot/src/utils/i18n.js b/bot/src/utils/i18n.js
index 2b4a4be..9b03994 100644
--- a/bot/src/utils/i18n.js
+++ b/bot/src/utils/i18n.js
@@ -1 +1,11 @@
-// Feature for AleeBot 4.1
+import i18next from 'i18next';
+import fsBackend from 'i18next-fs-backend';
+const fallbackLanguage = 'en';
+
+i18next.use(fsBackend).init({
+ debug: true,
+ fallbackLng: fallbackLanguage,
+ backend: {
+ loadPath: './src/translations/{{lng}}/{{ns}}.json'
+ }
+});
diff --git a/bot/src/utils/sync.js b/bot/src/utils/sync.js
index 9e11971..894015f 100644
--- a/bot/src/utils/sync.js
+++ b/bot/src/utils/sync.js
@@ -1,6 +1,7 @@
import { quote, pendingQuote } from '../db/models/quote.js';
import { guildSettings } from '../db/models/guild-settings.js';
import { commandUsages } from '../db/models/command-usages.js';
+import { blacklistGuild, blacklistUser } from '../db/models/blacklist.js';
export function syncDB() {
quote.sync().then(() => {
@@ -18,4 +19,12 @@ export function syncDB() {
commandUsages.sync().then(() => {
console.log('[>] Command usage database synced!');
});
+
+ blacklistUser.sync().then(() => {
+ console.log('[>] Blacklist user database synced!');
+ });
+
+ blacklistGuild.sync().then(() => {
+ console.log('[>] Blacklist guild database synced!');
+ });
}