mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 07:43:38 +00:00
Merge branch 'develop' into fix-33
This commit is contained in:
@ -23,4 +23,4 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ module.exports = {
|
||||
.setDescription(message.helpDescription)
|
||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
|
||||
|
||||
interaction.reply({
|
||||
embeds: [embed],
|
||||
ephemeral: true
|
||||
|
@ -19,4 +19,4 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -13,9 +13,9 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
||||
|
||||
if(radio){
|
||||
client.funcs.listStations(client, interaction);
|
||||
} else {
|
||||
@ -39,4 +39,4 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ module.exports = {
|
||||
value: "9"
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
const menu = new Discord.MessageActionRow()
|
||||
.addComponents(
|
||||
new Discord.MessageSelectMenu()
|
||||
@ -85,7 +85,7 @@ module.exports = {
|
||||
.setColor(client.config.embedColor)
|
||||
.setDescription(options.find(option => option.value == action).label)
|
||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
|
||||
|
||||
interaction.reply({
|
||||
embeds: [embed],
|
||||
ephemeral: true
|
||||
@ -117,7 +117,7 @@ module.exports = {
|
||||
client.stations = await fetch(client.config.stationslistUrl)
|
||||
.then(client.funcs.checkFetchStatus)
|
||||
.then(response => response.json());
|
||||
|
||||
|
||||
client.funcs.logger('Stations', 'Successfully fetched list');
|
||||
} catch (error) {
|
||||
client.funcs.logger('Stations', 'Fetching list failed');
|
||||
@ -133,46 +133,5 @@ module.exports = {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
|
||||
let currentRadios = client.radio.keys();
|
||||
let radio = currentRadios.next();
|
||||
let stoppedRadios = "";
|
||||
|
||||
client.user.setStatus('dnd');
|
||||
|
||||
while (!radio.done) {
|
||||
let currentRadio = client.radio.get(radio.value);
|
||||
currentRadio.guild = client.datastore.getEntry(radio.value).guild;
|
||||
|
||||
if(currentRadio){
|
||||
client.funcs.statisticsUpdate(client, currentRadio.guild, currentRadio);
|
||||
currentRadio.connection?.destroy();
|
||||
currentRadio.audioPlayer?.stop();
|
||||
currentRadio.message?.delete();
|
||||
client.radio.delete(radio.value);
|
||||
stoppedRadios += "-" + radio.value + ": " + currentRadio.guild.name + "\n";
|
||||
}
|
||||
radio = currentRadios.next();
|
||||
}
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(client.messages.maintenanceTitle)
|
||||
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["maintenance"].replace(/[^0-9]+/g, ''))
|
||||
.setColor(client.config.embedColor)
|
||||
.setDescription("Stopped all radios" + "\n" + stoppedRadios)
|
||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
|
||||
interaction.reply({
|
||||
embeds: [embed],
|
||||
ephemeral: true
|
||||
});*/
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ module.exports = {
|
||||
async execute(interaction, client, command) {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
||||
|
||||
let index = client.stations.findIndex(station => station.name == radio.station.name) + 1;
|
||||
if(index == client.stations.length) index = 0;
|
||||
|
||||
@ -20,7 +20,7 @@ module.exports = {
|
||||
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
radio.audioPlayer.stop();
|
||||
|
||||
|
||||
let date = new Date();
|
||||
radio.station = station;
|
||||
radio.textChannel = interaction.channel;
|
||||
@ -36,4 +36,4 @@ module.exports = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,11 +25,11 @@ module.exports = {
|
||||
.setDescription(message.nowplayingDescription)
|
||||
.setImage('https://waren.io/berriabot-temp-sa7a36a9xm6837br/images/empty-3.png')
|
||||
.setFooter(client.messages.footerText, "https://cdn.discordapp.com/emojis/" + client.messageEmojis["eximiabots"].replace(/[^0-9]+/g, ''));
|
||||
|
||||
|
||||
interaction.reply({
|
||||
embeds: [embed],
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ module.exports = {
|
||||
if (radio) {
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
radio.audioPlayer.stop();
|
||||
|
||||
|
||||
let date = new Date();
|
||||
radio.station = station;
|
||||
radio.textChannel = interaction.channel;
|
||||
@ -141,4 +141,4 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -20,12 +20,12 @@ module.exports = {
|
||||
|
||||
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();
|
||||
|
||||
|
||||
if(interaction.isCommand()) {
|
||||
client.funcs.play(interaction, interaction.guild, client, url);
|
||||
}
|
||||
@ -36,4 +36,4 @@ module.exports = {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ module.exports = {
|
||||
let currentGuild = client.datastore.getEntry(interaction.guild.id);
|
||||
let global = client.datastore.getEntry("global");
|
||||
let statistics = "";
|
||||
|
||||
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply({
|
||||
@ -35,7 +35,7 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setTitle(client.messages.statisticsTitle)
|
||||
.setThumbnail("https://cdn.discordapp.com/emojis/" + client.messageEmojis["statistics"].replace(/[^0-9]+/g, ''))
|
||||
@ -49,4 +49,4 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -28,4 +28,4 @@ module.exports = {
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -38,4 +38,4 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user