mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 20:23:16 +00:00
Updated code
This commit is contained in:
parent
ea2be5d5fb
commit
534bc74936
@ -3,21 +3,10 @@ module.exports = {
|
||||
description: 'Next Station',
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply({
|
||||
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
|
||||
});
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ module.exports = {
|
||||
description: 'Current Radio Station',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
async execute(interaction, client) {
|
||||
async execute(interaction, client, command) {
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
|
@ -4,20 +4,9 @@ module.exports = {
|
||||
permission: 'none',
|
||||
category: 'info',
|
||||
async execute(interaction, client) {
|
||||
let message = {};
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (!radio) return interaction.reply({
|
||||
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
|
||||
});
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ module.exports = {
|
||||
description: 'Stop radio',
|
||||
permission: 'none',
|
||||
category: 'radio',
|
||||
async execute(interaction, client) {
|
||||
async execute(interaction, client, command) {
|
||||
const radio = client.radio.get(interaction.guild.id);
|
||||
if (client.funcs.check(client, interaction, command)) {
|
||||
client.funcs.statisticsUpdate(client, interaction.guild, radio);
|
||||
|
@ -25,7 +25,7 @@ module.exports = {
|
||||
if (!command) return;
|
||||
|
||||
try {
|
||||
command.execute(interaction, client);
|
||||
command.execute(interaction, client, command);
|
||||
} catch (error) {
|
||||
interaction.reply({
|
||||
content: client.messages.runningCommandFailed,
|
||||
|
Loading…
Reference in New Issue
Block a user