mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-14 04:30:18 +00:00
commit
3db736d3f3
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.3.10",
|
"version": "0.3.11",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.3.10",
|
"version": "0.3.11",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/builders": "^0.6.0",
|
"@discordjs/builders": "^0.6.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eximiabots-radiox",
|
"name": "eximiabots-radiox",
|
||||||
"version": "0.3.10",
|
"version": "0.3.11",
|
||||||
"description": "Internet Radio to your Discord guild",
|
"description": "Internet Radio to your Discord guild",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -48,8 +48,11 @@ module.exports = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadEntry(id){
|
loadEntry(id){
|
||||||
const json = require(`../../../datastore/` + id + '.json');
|
try {
|
||||||
this.map.set(id, json);
|
const json = require(`../../../datastore/` + id + '.json');
|
||||||
|
this.map.set(id, json);
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getEntry(id){
|
getEntry(id){
|
||||||
|
@ -40,8 +40,9 @@ module.exports = class {
|
|||||||
|
|
||||||
let streamers = this.map.keys();
|
let streamers = this.map.keys();
|
||||||
streamers.forEach(streamer => {
|
streamers.forEach(streamer => {
|
||||||
if(client.stations.findIndex(station => station.name == streamer)) return;
|
if(client.stations.findIndex(station => station.name == streamer) == -1){
|
||||||
this.stop(streamer);
|
this.stop(streamer);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,15 +74,12 @@ module.exports = class {
|
|||||||
this.play(station);
|
this.play(station);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
audioPlayer
|
audioPlayer
|
||||||
.on('playing', () => {
|
.on('playing', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Playing");
|
this.logger('Streamer', station.name + " / " + "Playing");
|
||||||
})
|
})
|
||||||
.on('idle', () => {
|
.on('idle', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Idle");
|
this.logger('Streamer', station.name + " / " + "Idle");
|
||||||
this.play(station);
|
|
||||||
})
|
})
|
||||||
.on('paused', () => {
|
.on('paused', () => {
|
||||||
this.logger('Streamer', station.name + " / " + "Paused");
|
this.logger('Streamer', station.name + " / " + "Paused");
|
||||||
|
@ -155,7 +155,7 @@ module.exports = {
|
|||||||
client.config.maintenanceMode = true;
|
client.config.maintenanceMode = true;
|
||||||
|
|
||||||
client.user.setStatus('idle');
|
client.user.setStatus('idle');
|
||||||
client.funcs.saveRadios(client);
|
client.radio.save(client);
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if(client.radio.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
|
if(client.radio.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
|
||||||
@ -179,7 +179,7 @@ module.exports = {
|
|||||||
client.config.maintenanceMode = true;
|
client.config.maintenanceMode = true;
|
||||||
|
|
||||||
client.user.setStatus('idle');
|
client.user.setStatus('idle');
|
||||||
client.funcs.save(client);
|
client.radio.save(client);
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if(client.radio.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
|
if(client.radio.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
|
||||||
|
Loading…
Reference in New Issue
Block a user