mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:40:24 +00:00
Streamlined restore method in Radio class with play command
This commit is contained in:
parent
57aaf92947
commit
871cb475f9
@ -65,18 +65,8 @@ module.exports = class Radio extends Map {
|
|||||||
construct.connection = connection;
|
construct.connection = connection;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
construct.startTime = date.getTime();
|
construct.startTime = date.getTime();
|
||||||
|
|
||||||
client.funcs.play(client, null, guild, station);
|
|
||||||
|
|
||||||
client.datastore.checkEntry(guild.id);
|
client.datastore.checkEntry(guild.id);
|
||||||
construct.datastore = client.datastore.getEntry(guild.id);
|
client.funcs.play(client, null, guild, station);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user