mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 04:20:19 +00:00
Revert c7ddc6e
This commit is contained in:
parent
ccb386e3b3
commit
4bf74f15a2
@ -7,7 +7,7 @@ module.exports = {
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
|
||||
if(!client.stations.list) {
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
||||
@ -20,7 +20,7 @@ module.exports = {
|
||||
if(radio && !client.config.maintenanceMode){
|
||||
client.funcs.listStations(client, interaction);
|
||||
} else {
|
||||
let stations = `${client.stations.list.map(s => `**#** ${s.name}`).join('\n')}`
|
||||
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
|
||||
const hashs = stations.split('**#**').length;
|
||||
for (let i = 0; i < hashs; i++) {
|
||||
stations = stations.replace('**#**', `**${i + 1}.**`);
|
||||
|
@ -6,10 +6,10 @@ module.exports = {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
||||
let index = client.stations.list.findIndex(station => station.name == radio.station.name) + 1;
|
||||
if(index == client.stations.list.length) index = 0;
|
||||
let index = client.stations.findIndex(station => station.name == radio.station.name) + 1;
|
||||
if(index == client.stations.length) index = 0;
|
||||
|
||||
let station = client.stations.list[index];
|
||||
let station = client.stations[index];
|
||||
|
||||
if(!station) return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.noSearchResults,
|
||||
|
@ -71,13 +71,13 @@ module.exports = {
|
||||
ephemeral: true
|
||||
});
|
||||
} else if (!isNaN(number)) {
|
||||
if (number > client.stations.list.length - 1) {
|
||||
if (number > client.stations.length - 1) {
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.wrongStationNumber,
|
||||
ephemeral: true
|
||||
});
|
||||
} else {
|
||||
station = client.stations.list[number];
|
||||
station = client.stations[number];
|
||||
}
|
||||
} else {
|
||||
if (query.length < 3) return interaction.reply({
|
||||
|
@ -6,10 +6,10 @@ module.exports = {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
||||
let index = client.stations.list.findIndex(station => station.name == radio.station.name) - 1;
|
||||
if(index == -1) index = client.stations.list.length - 1;
|
||||
let index = client.stations.findIndex(station => station.name == radio.station.name) - 1;
|
||||
if(index == -1) index = client.stations.length - 1;
|
||||
|
||||
let station = client.stations.list[index];
|
||||
let station = client.stations[index];
|
||||
|
||||
if(!station) return interaction.reply({
|
||||
content: client.messageEmojis["error"] + client.messages.noSearchResults,
|
||||
|
@ -7,12 +7,12 @@ module.exports = {
|
||||
category: 'info',
|
||||
execute(interaction, client) {
|
||||
let message = {};
|
||||
let stations = client.stations.list;
|
||||
let stations = client.stations;
|
||||
let currentGuild = client.datastore.getEntry(interaction.guild.id);
|
||||
let global = client.datastore.getEntry("global");
|
||||
let statistics = "";
|
||||
|
||||
if(!client.stations.list) {
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply({
|
||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
||||
|
Loading…
Reference in New Issue
Block a user