mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:00:18 +00:00
Updated code
This commit is contained in:
parent
ea2be5d5fb
commit
534bc74936
@ -3,21 +3,10 @@ module.exports = {
|
|||||||
description: 'Next Station',
|
description: 'Next Station',
|
||||||
permission: 'none',
|
permission: 'none',
|
||||||
category: 'info',
|
category: 'info',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client, command) {
|
||||||
let message = {};
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
if (!radio) return interaction.reply({
|
console.log(client.stations.find(station => station.name == radio.station.name));
|
||||||
content: 'There is nothing playing.',
|
}
|
||||||
ephemeral: true
|
|
||||||
});
|
|
||||||
if(!client.stations) {
|
|
||||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
|
||||||
return interaction.reply({
|
|
||||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
|
||||||
ephemeral: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
description: 'Current Radio Station',
|
description: 'Current Radio Station',
|
||||||
permission: 'none',
|
permission: 'none',
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client, command) {
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
let message = {};
|
let message = {};
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
|
@ -4,20 +4,9 @@ module.exports = {
|
|||||||
permission: 'none',
|
permission: 'none',
|
||||||
category: 'info',
|
category: 'info',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client) {
|
||||||
let message = {};
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
if (!radio) return interaction.reply({
|
console.log(client.stations.find(station => station.name == radio.station.name));
|
||||||
content: 'There is nothing playing.',
|
}
|
||||||
ephemeral: true
|
|
||||||
});
|
|
||||||
if(!client.stations) {
|
|
||||||
message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild);
|
|
||||||
return interaction.reply({
|
|
||||||
content: client.messageEmojis["error"] + message.errorToGetPlaylist,
|
|
||||||
ephemeral: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ module.exports = {
|
|||||||
description: 'Stop radio',
|
description: 'Stop radio',
|
||||||
permission: 'none',
|
permission: 'none',
|
||||||
category: 'radio',
|
category: 'radio',
|
||||||
async execute(interaction, client) {
|
async execute(interaction, client, command) {
|
||||||
const radio = client.radio.get(interaction.guild.id);
|
const radio = client.radio.get(interaction.guild.id);
|
||||||
if (client.funcs.check(client, interaction, command)) {
|
if (client.funcs.check(client, interaction, command)) {
|
||||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||||
|
@ -25,7 +25,7 @@ module.exports = {
|
|||||||
if (!command) return;
|
if (!command) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
command.execute(interaction, client);
|
command.execute(interaction, client, command);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
interaction.reply({
|
interaction.reply({
|
||||||
content: client.messages.runningCommandFailed,
|
content: client.messages.runningCommandFailed,
|
||||||
|
Loading…
Reference in New Issue
Block a user