eximiabots-radiox/events/ready.js

19 lines
717 B
JavaScript
Raw Normal View History

const fetch = require('node-fetch');
2020-03-02 19:38:42 +00:00
module.exports = {
name: 'ready',
async execute(client, Discord) {
2020-03-09 00:00:02 +00:00
2020-03-08 14:22:00 +00:00
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');
2020-03-09 00:00:02 +00:00
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);
2020-03-02 19:38:42 +00:00
}
2020-03-08 14:22:00 +00:00
}