Comments (1)
Issue description
My lavalink is working fine, my code is fine but the bot is not playing audio dont know why..
Code sample
const { Client, EmbedBuilder, PermissionFlagsBits } = require("discord.js"); module.exports = { name: "play", category: "Music", aliases: ["p"], clientPermissions: [PermissionFlagsBits.Connect, PermissionFlagsBits.Speak], description: "Play songs", inVoice: true, execute: async (message, args, client) => { /** * * @param {Client} client * @param {CommandInteraction} interaction * @param {String} args * @returns */ const query = args.join(' '); //This will not load the third-party link if (query.includes(`bit.ly`)) { return message.channel.send({ embeds: [ new EmbedBuilder() .setColor(client.embedColor) .setDescription(`**We Don't Support This Link**`), ], }); } let player = client.riffy.players.get(message.guildId); if (!player) player = await client.riffy.createConnection({ guildId: message.guild.id, voiceChannel: message.member.voice.channel.id, textChannel: message.channel.id, deaf: true, }); const resolve = await client.riffy.resolve({ query: query, requester: message.author, }); const { loadType, tracks, playlistInfo } = resolve; if (loadType === "PLAYLIST_LOADED") { for (const track of resolve.tracks) { track.info.requester = message.author; player.queue.add(track); } await message.reply( `Added ${tracks.length} songs from ${playlistInfo.name} playlist.` ); if (!player.playing && !player.paused) return player.play(); } else if (loadType === "SEARCH_RESULT" || loadType === "TRACK_LOADED") { const track = tracks.shift(); track.info.requester = message.author; player.queue.add(track); await message.reply(`Added **${track.info.title}** to the queue.`); if (!player.playing && !player.paused) return player.play(); } else { return message.reply(`There were no results found for your query.`); } }, };Versions
"discord.js": "14.11",
"fs": "^0.0.1-security",
"musicard": "^2.0.3",
"riffy": "^1.0.3",
"riffy-spotify": "^1.0.2"Issue priority
High (immediate attention needed)
Show me initialisation of Riffy & raw event code.
from riffy.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riffy.