mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-11-04 03:09:32 +00:00 
			
		
		
		
	Changes
This commit is contained in:
		@@ -12,12 +12,10 @@ module.exports = {
 | 
			
		||||
        radio.time = radio.connection.dispatcher.streamTime;
 | 
			
		||||
        const completed = (radio.time.toFixed(0));
 | 
			
		||||
 | 
			
		||||
        const stations = await client.funcs.radiostations();
 | 
			
		||||
 | 
			
		||||
        const embed = new Discord.MessageEmbed()
 | 
			
		||||
            .setTitle("<a:aNotes:674602408105476106> Now Playing")
 | 
			
		||||
            .setColor(client.config.embedColor)
 | 
			
		||||
            .setDescription(`**${stations[radio.station].name}** \n Owner: ${stations[radio.station].owner} \n\`${client.funcs.msToTime(completed, "hh:mm:ss")}\``)
 | 
			
		||||
            .setDescription(`**${client.stations[radio.station].name}** \n Owner: ${client.stations[radio.station].owner} \n\`${client.funcs.msToTime(completed, "hh:mm:ss")}\``)
 | 
			
		||||
            .setFooter('EximiaBots by Warén Media');
 | 
			
		||||
        return msg.channel.send(embed);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,18 @@
 | 
			
		||||
module.exports = {
 | 
			
		||||
    name: 'ready',
 | 
			
		||||
    async execute(client, Discord) {
 | 
			
		||||
        const fetch = require('node-fetch');
 | 
			
		||||
        
 | 
			
		||||
        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');
 | 
			
		||||
        
 | 
			
		||||
        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);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,6 @@ const { Client, Collection } = require('discord.js');
 | 
			
		||||
const Discord = require('discord.js');
 | 
			
		||||
const fs = require('fs');
 | 
			
		||||
const path = require('path');
 | 
			
		||||
const fetch = require('node-fetch');
 | 
			
		||||
const events = '../events/';
 | 
			
		||||
 | 
			
		||||
module.exports = class extends Client {
 | 
			
		||||
@@ -30,9 +29,6 @@ module.exports = class extends Client {
 | 
			
		||||
            this.commandAliases.set(command.alias, command);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        client.stations = fetch('https://gitea.cwinfo.org/cwchristerw/radio/raw/branch/master/playlist.json')
 | 
			
		||||
            .then(res => res.json());
 | 
			
		||||
 | 
			
		||||
        this.on('ready', () => {
 | 
			
		||||
            require(`${events}ready`).execute(this, Discord);
 | 
			
		||||
        });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user