mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 13:03:37 +00:00
Search Stations and large update
This commit is contained in:
@ -3,17 +3,27 @@ const fetch = require('node-fetch');
|
||||
module.exports = {
|
||||
name: 'ready',
|
||||
async execute(client, Discord) {
|
||||
|
||||
|
||||
console.log('RadioX');
|
||||
console.log('We will bring you finnish radio to your discord server');
|
||||
console.log('(c)2020 EximiaBots by Warén Media / Christer Warén & MatteZ02');
|
||||
|
||||
|
||||
let user = "";
|
||||
for (i = 0; i < client.config.devId.length; i++) {
|
||||
user = await client.users.fetch(client.config.devId[i]);
|
||||
if (i == client.config.devId.length - 1) {
|
||||
client.developers += user.tag;
|
||||
} else {
|
||||
client.developers += user.tag + " & ";
|
||||
}
|
||||
}
|
||||
|
||||
client.stations = await fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')
|
||||
.then(res => res.json());
|
||||
|
||||
|
||||
setInterval(async () => {
|
||||
client.stations = await fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')
|
||||
.then(res => res.json());
|
||||
}, 3600);
|
||||
}, 3600000);
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ module.exports = {
|
||||
if (newState.member.voice.channel === null) {
|
||||
radio.songs = [];
|
||||
radio.looping = false;
|
||||
radio.endReason = "manual disconnect";
|
||||
return client.radio.delete(newState.guild.id);
|
||||
}
|
||||
if (newState.member.voice.channel !== radio.voiceChannel) {
|
||||
|
Reference in New Issue
Block a user