mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-23 03:33:17 +00:00
ffmpeg error detections system
This commit is contained in:
parent
069ba70cb5
commit
2e31350def
@ -28,6 +28,7 @@ module.exports = class extends Client {
|
|||||||
this.funcs.msToTime = require('./funcs/msToTime.js');
|
this.funcs.msToTime = require('./funcs/msToTime.js');
|
||||||
this.funcs.dbget = require('./funcs/dbget.js');
|
this.funcs.dbget = require('./funcs/dbget.js');
|
||||||
this.funcs.exe = require('./funcs/exe.js');
|
this.funcs.exe = require('./funcs/exe.js');
|
||||||
|
this.funcs.ffmpegTest = require('./funcs/ffmpeg.js');
|
||||||
|
|
||||||
admin.initializeApp({
|
admin.initializeApp({
|
||||||
credential: admin.credential.cert(serviceAccount),
|
credential: admin.credential.cert(serviceAccount),
|
||||||
|
7
Struct/funcs/ffmpeg.js
Normal file
7
Struct/funcs/ffmpeg.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module.exports = async function (client) {
|
||||||
|
try {
|
||||||
|
await client.channels.get('570531724002328577').join()
|
||||||
|
} catch (error) {
|
||||||
|
client.channels.get(client.config.debug_channel).send("Error detected: " + error);
|
||||||
|
}
|
||||||
|
};
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'ready',
|
name: 'ready',
|
||||||
async execute(client, dbl) {
|
async execute(client, dbl, Discord) {
|
||||||
const remoteMusixGuildsData = await client.funcs.dbget('guilds', null, client);
|
const remoteMusixGuildsData = await client.funcs.dbget('guilds', null, client);
|
||||||
const remoteMusixPlaylistsData = await client.funcs.dbget('playlists', null, client);
|
const remoteMusixPlaylistsData = await client.funcs.dbget('playlists', null, client);
|
||||||
remoteMusixGuildsData.forEach(guildData => {
|
remoteMusixGuildsData.forEach(guildData => {
|
||||||
@ -44,5 +44,8 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
dbl.postStats(client.guilds.size);
|
dbl.postStats(client.guilds.size);
|
||||||
}, 1800000);
|
}, 1800000);
|
||||||
|
setInterval(() => {
|
||||||
|
client.funcs.ffmpeg(client, disco);
|
||||||
|
}, 7200000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
index.js
2
index.js
@ -37,7 +37,7 @@ for (const file of settingFiles) {
|
|||||||
client.on('ready', async () => {
|
client.on('ready', async () => {
|
||||||
const eventName = 'ready';
|
const eventName = 'ready';
|
||||||
const event = client.events.get(eventName) || client.events.find(ent => ent.aliases && ent.aliases.includes(eventName));
|
const event = client.events.get(eventName) || client.events.find(ent => ent.aliases && ent.aliases.includes(eventName));
|
||||||
event.execute(client, dbl);
|
event.execute(client, dbl, Discord);
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('message', message => {
|
client.on('message', message => {
|
||||||
|
Loading…
Reference in New Issue
Block a user