Skip to content

Commit

Permalink
modificada la ruta del proyecto
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Blasco committed Mar 4, 2021
1 parent 80dcb07 commit 5600a70
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 41 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 0 additions & 30 deletions lavalink/application-example.yml

This file was deleted.

3 changes: 0 additions & 3 deletions lavalink/start.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
64 changes: 64 additions & 0 deletions src/commands/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
module.exports = {
name: 'test',
music: true,
async execute(msg) {},
};

// const { prefix: basePrefix } = require('../config');

// module.exports = {
// name: 'message',
// async execute(client, msg) {
// // Comprueba si el comando debe ejecutarse
// if (!msg.content.startsWith(basePrefix) || msg.author.bot) {
// return;
// }

// // Obtiene el nombre del comando y los argumentos
// const args = msg.content.slice(basePrefix.length).trim().split(/ +/);
// const commandName = args.shift().toLocaleLowerCase();

// // Obtiene el comando introducido por el usuario
// const commands = client.commands;
// const command =
// commands.get(commandName) ||
// commands.find((cmd) => cmd.aliases && cmd.aliases.includes(commandName));

// if (!command) return;

// // Comprueba si debe actualizar los datos del servidor
// if (command.music) {
// const { music, channels } = msg.guild;
// await music.checkServerData();

// // Datos del servidor
// const musicData = music.serverData;
// // Obtiene el canal de gestión
// const managementChannel = channels.cache.get(
// musicData.player.textChannel
// );

// if (!managementChannel && command.name !== 'setup') {
// return msg.reply(
// 'No se ha encontrado el canal de gestión.\n' +
// 'Para reproducir música debes configurar el servidor con `!setup`'
// );
// } else {
// if (managementChannel) await music.fetchPlayerMessage();

// if (msg.channel.id === musicData.player.textChannel)
// command.isManagementChannel = true;
// else command.isManagementChannel = false;
// }
// }

// // Realiza la ejecución del comando
// try {
// command.execute(msg, args);
// } catch (error) {
// console.error(
// `Ha ocurrido un error al tratar de ejecutar el comando (${command.name}): ${error.message}`
// );
// }
// },
// };
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ module.exports = {
execute(client, channel) {
if (channel.name === 'tego-music')
channel
.send(
'__**Canal de gestión:**__\n' +
'Escribe el nombre/url de la canción a buscar.\n' +
'\u200B',
{ embed: playerEmbeds.player() }
)
.send('Escribe el nombre/url de la canción a buscar.\n' + '\u200B', {
embed: playerEmbeds.player(),
})
.then(async (msg) => {
const musicFilter = { guildId: channel.guild.id };
const musicUpdate = { 'playerData.messageId': msg.id };
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
const playerEmbed = playerEmbeds.player();

// Edita el mensaje del reproductor
return playerMessage.edit(playerEmbed);
return playerMessage.edit(
'Escribe el nombre/url de la canción a buscar.\n' + '\u200B',
playerEmbed
);
},
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 10 additions & 1 deletion bot/src/structures/TegoMusic.js → src/structures/TegoMusic.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,17 @@ module.exports = class TegoMusic {

player.queue.add(result.tracks[0]);

if (!player.playing && !player.paused && !player.queue.size)
if (!player.playing && !player.paused && !player.queue.size) {
// Edita el mensaje del reproductor
this.playerMessage.edit(
'Escribe el nombre/url de la canción a buscar.\n' +
'__**Canciones en la cola:**__\n' +
`https://tegobot.com/queue?id=${this.guild.id}\n` +
'\u200B'
);

player.play();
}

return resolve('TRACK_LOADED');
// Ejecuta cuando se ha cargado la playlist introducida
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5600a70

Please sign in to comment.