aboutsummaryrefslogtreecommitdiff
path: root/bot/src/utils/sync.js
blob: 894015f44aad02f152a0fa458eeb783288e9a732 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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(() => {
        console.log('[>] Quote database synced!');
    });

    pendingQuote.sync().then(() => {
        console.log('[>] Pending Quote database synced!');
    });

    guildSettings.sync().then(() => {
        console.log('[>] Guild database synced!');
    });

    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!');
    });
}