From 871cb475f9ca95cbf542902424f0e21a26e79c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 17 Sep 2021 23:29:04 +0300 Subject: [PATCH] Streamlined restore method in Radio class with play command --- src/client/classes/Radio.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/client/classes/Radio.js b/src/client/classes/Radio.js index ca0af5b..64c67a1 100644 --- a/src/client/classes/Radio.js +++ b/src/client/classes/Radio.js @@ -65,18 +65,8 @@ module.exports = class Radio extends Map { construct.connection = connection; let date = new Date(); construct.startTime = date.getTime(); - - client.funcs.play(client, null, guild, station); - client.datastore.checkEntry(guild.id); - construct.datastore = client.datastore.getEntry(guild.id); - - if (!construct.datastore.statistics[construct.station.name]) { - construct.datastore.statistics[construct.station.name] = {}; - construct.datastore.statistics[construct.station.name].time = 0; - construct.datastore.statistics[construct.station.name].used = 0; - client.datastore.updateEntry(guild, construct.datastore); - } + client.funcs.play(client, null, guild, station); } catch (error) { console.log(error); }