mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 01:13:17 +00:00
Fixing indentations in multiple commands
This commit is contained in:
parent
8d15567f85
commit
f0887514af
@ -7,10 +7,10 @@ module.exports = {
|
||||
category: 'radio',
|
||||
execute(interaction, client, Discord, command) {
|
||||
let message = {};
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
let stations = `${client.stations.map(s => `**#** ${s.name}`).join('\n')}`
|
||||
const hashs = stations.split('**#**').length;
|
||||
for (let i = 0; i < hashs; i++) {
|
||||
|
@ -9,10 +9,10 @@ module.exports = {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply('There is nothing playing.');
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
const completed = (radio.connection.dispatcher.streamTime.toFixed(0));
|
||||
|
||||
message.nowplayingDescription = client.messages.nowplayingDescription.replace("%radio.station.name%", radio.station.name);
|
||||
|
@ -11,10 +11,10 @@ module.exports = {
|
||||
let currentGuild = client.datastore.getEntry(interaction.guild.id);
|
||||
let statistics = "";
|
||||
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
if(!client.stations) {
|
||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
||||
return interaction.reply(client.messageEmojis["error"] + message.errorToGetPlaylist);
|
||||
}
|
||||
|
||||
if(!currentGuild || currentGuild && !currentGuild.statistics){
|
||||
statistics = "You have not listened any radio station";
|
||||
|
@ -1,19 +1,19 @@
|
||||
module.exports = {
|
||||
name: 'stop',
|
||||
description: 'Stop radio',
|
||||
alias: 's',
|
||||
usage: '',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
execute(interaction, client, Discord, command) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
name: 'stop',
|
||||
description: 'Stop radio',
|
||||
alias: 's',
|
||||
usage: '',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
execute(interaction, client, Discord, command) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
radio.connection?.destroy();
|
||||
radio.audioPlayer?.stop();
|
||||
client.funcs.logger('Radio', 'Stream stopped' + " / " + interaction.guild.id);
|
||||
client.radio.delete(interaction.guild.id);
|
||||
interaction.reply(client.messageEmojis["stop"] + client.messages.stop);
|
||||
}
|
||||
}
|
||||
radio.connection?.destroy();
|
||||
radio.audioPlayer?.stop();
|
||||
client.funcs.logger('Radio', 'Stream stopped' + " / " + interaction.guild.id);
|
||||
client.radio.delete(interaction.guild.id);
|
||||
interaction.reply(client.messageEmojis["stop"] + client.messages.stop);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user