mirror of
				https://github.com/warengroup/eximiabots-radiox.git
				synced 2025-10-31 18:11:34 +00:00 
			
		
		
		
	Fixed statistics command when guild has empty statistics (part 2)
This commit is contained in:
		| @@ -11,7 +11,9 @@ module.exports = { | ||||
|         let statistics; | ||||
|         let i = 0; | ||||
|          | ||||
|         if(currentGuild.statistics){ | ||||
|         if(!currentGuild || currentGuild && !currentGuild.statistics){ | ||||
|             statistics = "You have not listened any radio station"; | ||||
|         } else { | ||||
|             Object.keys(client.stations).forEach(function(station) { | ||||
|                 if(currentGuild.statistics[stations[station].name]){ | ||||
|                     if(i > 0){ | ||||
| @@ -28,10 +30,6 @@ module.exports = { | ||||
|             }); | ||||
|         } | ||||
|          | ||||
|         if(!statistics){ | ||||
|             statistics = "You have not listened any radio station"; | ||||
|         } | ||||
|          | ||||
|         const embed = new Discord.MessageEmbed() | ||||
|             .setTitle(client.messages.statisticsTitle) | ||||
|             .setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["list"].replace(/[^0-9]+/g, '')) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Christer Warén
					Christer Warén