1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-09-20 04:31:56 +00:00
musix-oss/Struct/Client.js
2019-12-16 21:01:42 +02:00

48 lines
1.3 KiB
JavaScript

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');
this.funcs.ffmpegTest = require('./funcs/ffmpeg.js');
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
});
this.db = admin.firestore();
this.global = {
db: {
guilds: {},
playlists: {},
},
};
this.db.FieldValue = require('firebase-admin').firestore.FieldValue;
}
};