This commit is contained in:
2022-05-09 19:29:50 +02:00
parent d81722dec8
commit af29582c00
19 changed files with 209 additions and 6 deletions

3
player/botDisconnect.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, queue) => {
message.channel.send(`${client.emotes.error} - Music stopped as i have been disconnected from the channel !`);
};

3
player/channelEmpty.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, queue) => {
message.channel.send(`${client.emotes.error} - Music stopped as there is no more member in the voice channel !`);
};

21
player/error.js Normal file
View File

@@ -0,0 +1,21 @@
module.exports = (client, error, message, ...args) => {
switch (error) {
case 'NotPlaying':
message.channel.send(`${client.emotes.error} - There is no music being played on this server !`);
break;
case 'NotConnected':
message.channel.send(`${client.emotes.error} - You are not connected in any voice channel !`);
break;
case 'UnableToJoin':
message.channel.send(`${client.emotes.error} - I am not able to join your voice channel, please check my permissions !`);
break;
case 'VideoUnavailable':
message.channel.send(`${client.emotes.error} - ${args[0].title} is not available in your country! Skipping...`);
break;
case 'MusicStarting':
message.channel.send(`The music is starting... please wait and retry!`);
break;
default:
message.channel.send(`${client.emotes.error} - Something went wrong ... Error : ${error}`);
};
};

3
player/noResults.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, query) => {
message.channel.send(`${client.emotes.error} - No results found on YouTube for ${query} !`);
};

3
player/playlistAdd.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, queue, playlist) => {
message.channel.send(`${client.emotes.music} - ${playlist.title} has been added to the queue (**${playlist.tracks.length}** songs) !`);
};

3
player/queueEnd.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, queue) => {
message.channel.send(`${client.emotes.error} - Music stopped as there is no more music in the queue !`);
};

3
player/searchCancel.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, query, tracks) => {
message.channel.send(`${client.emotes.error} - You did not provide a valid response ... Please send the command again !`);
};

View File

@@ -0,0 +1,6 @@
module.exports = (client, message, query, tracks, content, collector) => {
if (content === 'cancel') {
collector.stop();
return message.channel.send(`${client.emotes.success} - The selection has been **cancelled** !`);
} else message.channel.send(`${client.emotes.error} - You must send a valid number between **1** and **${tracks.length}** !`);
};

11
player/searchResults.js Normal file
View File

@@ -0,0 +1,11 @@
module.exports = (client, message, query, tracks) => {
message.channel.send({
embed: {
color: 'BLUE',
author: { name: `Here are your search results for ${query}` },
footer: { text: 'This bot uses a Github project made by Zerio (ZerioDev/Music-bot)' },
timestamp: new Date(),
description: `${tracks.map((t, i) => `**${i + 1}** - ${t.title}`).join('\n')}`,
},
});
};

3
player/trackAdd.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, queue, track) => {
message.channel.send(`${client.emotes.music} - ${track.title} has been added to the queue !`);
};

3
player/trackStart.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = (client, message, track) => {
message.channel.send(`${client.emotes.music} - Now playing ${track.title} into ${message.member.voice.channel.name} ...`);
};