Open B3ni15 opened 9 months ago
Bug Description For some reason, it always says "client not defined" and I always get this error.
Reproduction Steps Steps to reproduce the behavior:
and error..
Expected Result Bot should start without error!
Attachments
My Command:
const { MessageEmbed } = require("discord.js"); const { Player } = require("discord-music-player"); const player = new Player(client, { leaveOnEmpty: false, });; module.exports = { name: "play", description: "Zene Lejátszása", category: "song", slash: true, options: [ { name: "zene", description: "Zene linkje amit szeretnél leállítani!", type: "STRING", required: true, }, ], global: true, error: async () => {}, run: async (data) => { const zene = data.interaction.options.getString('zene'); const voiceChannel = data.interaction.member.voice.channel; let queue = player.createQueue(data.interaction.guild.id); let guildQueue = player.getQueue(data.interaction.guild.id); if (!zene) { return data.interaction.reply("> Kérlek adj meg egy zenét!"); } if (!voiceChannel) { return data.interaction.reply("> Legyél bent egy hangcsatornában!"); } await queue.join(voiceChannel); let song = await queue.play(zene).catch(err => { console.log(err); if(!guildQueue) queue.stop(); }); const embed = new MessageEmbed() .setTitle(`Zene Lejátszása`) .setDescription(`> Beléptem a hangcsatornába és elkezdtem lejátszani a zenét!`) .setTimestamp() .addField("Zene:", queue.author, true) .addField("Hossz:", queue.duration, true) .addField("Link:", queue.url, true) .addField("Hozzáadta:", queue.requestedBy, true) .setThumbnail(queue.thumbnail) .setColor("#7289DA"); data.interaction.editReply({ embeds: [embed], }); }, };
Versioning:
Bug Description For some reason, it always says "client not defined" and I always get this error.
Reproduction Steps Steps to reproduce the behavior:
and error..
Expected Result Bot should start without error!
Attachments
My Command:
Versioning: