mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 22:43:17 +00:00
Changing big initials to messages
This commit is contained in:
parent
44b35eee8c
commit
a2fa939d07
@ -10,9 +10,9 @@ module.exports = {
|
|||||||
const radio = client.radio.get(msg.guild.id);
|
const radio = client.radio.get(msg.guild.id);
|
||||||
const voiceChannel = msg.member.voice.channel;
|
const voiceChannel = msg.member.voice.channel;
|
||||||
if (!radio) {
|
if (!radio) {
|
||||||
if (!msg.member.voice.channel) return msg.channel.send('you need to be in a voice channel to play music!');
|
if (!msg.member.voice.channel) return msg.channel.send('You need to be in a voice channel to play music!');
|
||||||
} else {
|
} else {
|
||||||
if (voiceChannel !== radio.voiceChannel) return msg.channel.send('you need to be in the same voice channel as RadioX to play music!');
|
if (voiceChannel !== radio.voiceChannel) return msg.channel.send('You need to be in the same voice channel as RadioX to play music!');
|
||||||
}
|
}
|
||||||
if (!args[1]) return msg.channel.send('You need to use a number or search for a supported station!');
|
if (!args[1]) return msg.channel.send('You need to use a number or search for a supported station!');
|
||||||
const permissions = voiceChannel.permissionsFor(msg.client.user);
|
const permissions = voiceChannel.permissionsFor(msg.client.user);
|
||||||
@ -28,13 +28,13 @@ module.exports = {
|
|||||||
return;
|
return;
|
||||||
} else if (!isNaN(number)) {
|
} else if (!isNaN(number)) {
|
||||||
if (number > client.stations.length - 1) {
|
if (number > client.stations.length - 1) {
|
||||||
return msg.channel.send('no such station!');
|
return msg.channel.send('No such station!');
|
||||||
} else {
|
} else {
|
||||||
url = client.stations[number].stream[client.stations[number].stream.default];
|
url = client.stations[number].stream[client.stations[number].stream.default];
|
||||||
station = client.stations[number];
|
station = client.stations[number];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (args[1].length < 4) return msg.channel.send('station must be over 3 characters!');
|
if (args[1].length < 4) return msg.channel.send('Station must be over 3 characters!');
|
||||||
const sstation = await client.funcs.searchStation(args.slice(1).join(' '), client);
|
const sstation = await client.funcs.searchStation(args.slice(1).join(' '), client);
|
||||||
if (!sstation) return msg.channel.send('No stations found!');
|
if (!sstation) return msg.channel.send('No stations found!');
|
||||||
url = sstation.stream[sstation.stream.default];
|
url = sstation.stream[sstation.stream.default];
|
||||||
|
@ -7,7 +7,7 @@ module.exports = {
|
|||||||
category: 'music',
|
category: 'music',
|
||||||
execute(msg, args, client, Discord, prefix, command) {
|
execute(msg, args, client, Discord, prefix, command) {
|
||||||
const radio = client.radio.get(msg.guild.id);
|
const radio = client.radio.get(msg.guild.id);
|
||||||
if (!args[1] && radio) return msg.channel.send(`current volume: **${radio.volume}**`);
|
if (!args[1] && radio) return msg.channel.send(`Current volume: **${radio.volume}**`);
|
||||||
const volume = parseFloat(args[1]);
|
const volume = parseFloat(args[1]);
|
||||||
if (client.funcs.check(client, msg, command)) {
|
if (client.funcs.check(client, msg, command)) {
|
||||||
if (isNaN(volume)) return msg.channel.send('you need to enter a valid __number__.');
|
if (isNaN(volume)) return msg.channel.send('you need to enter a valid __number__.');
|
||||||
@ -15,7 +15,7 @@ module.exports = {
|
|||||||
if (volume < 0) return msg.channel.send('The volume needs to be a positive number!');
|
if (volume < 0) return msg.channel.send('The volume needs to be a positive number!');
|
||||||
radio.volume = volume;
|
radio.volume = volume;
|
||||||
radio.connection.dispatcher.setVolume(volume / 5);
|
radio.connection.dispatcher.setVolume(volume / 5);
|
||||||
return msg.channel.send(`volume is now: **${volume}**`);
|
return msg.channel.send(`Volume is now: **${volume}**`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@ module.exports = function (client, msg, command) {
|
|||||||
const permissions = msg.channel.permissionsFor(msg.author);
|
const permissions = msg.channel.permissionsFor(msg.author);
|
||||||
if (!radio || !radio.playing) return msg.channel.send('There is nothing playing!');
|
if (!radio || !radio.playing) return msg.channel.send('There is nothing playing!');
|
||||||
if (msg.author.id !== client.config.devId) {
|
if (msg.author.id !== client.config.devId) {
|
||||||
if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(`you need to be in the same voice channel as RadioX to use this command!`);
|
if (msg.member.voice.channel !== radio.voiceChannel) return msg.channel.send(`You need to be in the same voice channel as RadioX to use this command!`);
|
||||||
if (!permissions.has(command.permission)) {
|
if (!permissions.has(command.permission)) {
|
||||||
msg.channel.send(`You need the \`${command.permission}\` permission to use this command!`);
|
msg.channel.send(`You need the \`${command.permission}\` permission to use this command!`);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user