1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-14 03:30:18 +00:00
musix-oss/Struct/Client.js

49 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-12-05 13:17:15 +00:00
const { Client, Collection } = require('discord.js');
const admin = require('firebase-admin');
const serviceAccount = require('./serviceAccount.json');
module.exports = class extends Client {
constructor() {
super({
disableEveryone: true,
disabledEvents: ['TYPING_START']
});
this.commands = new Collection();
this.commandAliases = new Collection();
this.playlistCmd = new Collection();
this.settingCmd = new Collection();
this.events = new Collection();
this.queue = new Map();
this.funcs = {};
this.funcs.handleVideo = require('./funcs/handleVideo.js');
this.funcs.play = require('./funcs/play.js');
this.funcs.msToTime = require('./funcs/msToTime.js');
this.funcs.dbget = require('./funcs/dbget.js');
this.funcs.exe = require('./funcs/exe.js');
2019-12-17 02:12:12 +00:00
this.funcs.ffmpeg = require('./funcs/ffmpeg.js');
2019-12-05 13:17:15 +00:00
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
});
this.db = admin.firestore();
this.global = {
db: {
guilds: {},
playlists: {},
},
};
this.db.FieldValue = require('firebase-admin').firestore.FieldValue;
}
2019-12-17 02:12:12 +00:00
};