mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 19:43:18 +00:00
Updated next & prev command
This commit is contained in:
parent
11573a5113
commit
8fdcdd0116
@ -6,7 +6,18 @@ module.exports = {
|
||||
async execute(interaction, client, command) {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
console.log(client.stations.find(station => station.name == radio.station.name));
|
||||
let station = client.stations[client.stations.findIndex(station => station.name == radio.station.name) + 1];
|
||||
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
radio.audioPlayer.stop();
|
||||
|
||||
let date = new Date();
|
||||
radio.station = station;
|
||||
radio.textChannel = interaction.channel;
|
||||
radio.startTime = date.getTime();
|
||||
client.funcs.play(interaction, interaction.guild, client, url);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,18 @@ module.exports = {
|
||||
async execute(interaction, client) {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
console.log(client.stations.find(station => station.name == radio.station.name));
|
||||
let station = client.stations[client.stations.findIndex(station => station.name == radio.station.name) - 1];
|
||||
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
radio.audioPlayer.stop();
|
||||
|
||||
let date = new Date();
|
||||
radio.station = station;
|
||||
radio.textChannel = interaction.channel;
|
||||
radio.startTime = date.getTime();
|
||||
client.funcs.play(interaction, interaction.guild, client, url);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user