The bot believes it's jamming out to some tunes, but there's nothing but silence in the realm

Essentially, a slash command is utilized to initiate playing a music video in Distube. It plays for approximately 30 seconds and then abruptly stops, even though the queue indicates that the music is still playing. There are no errors appearing in my terminal or any related logs.

I am uncertain about what specifics to provide, so please inform me accordingly.

index.js

const distube = require("distube")
const Distube = new distube.DisTube(Client, {
    emitNewSongOnly: true,
    leaveOnStop:false,
    leaveOnFinish: false,
    updateYouTubeDL: true,
    nsfw: true,
    plugins:[new SpotifyPlugin()],
    youtubeCookie:"COOKIE"
})

play.js

module.exports = {
    data:{name:"play",description:"Play music",options:[{name:"query",description:"Get song name",type:"STRING",required:true}]},
    async execute(utils,Client,i,Discord,userModel,serverModel,banModel,Distube){
        if(!i.member.voice.channel)return i.reply({content:'Please join a voice channel',ephemeral:true})
        if(!i.guild.members.me.voice.channel == i.member.voice.channel)return i.reply({content:'We are not in the same voice channel',ephemeral:true})
        const song = i.options.getString("query")
        Distube.play(i.member.voice.channel, song, {member:i.member,textChannel:i.channel})
        i.reply({content:"Starting...",ephemeral:true})
    }
}

addSong.js

const {Distube} = require("../index")
const Discord = require("discord.js")
const utils = require("../utils/utils")
Distube.on("addSong", (queue,song) => {
    queue.textChannel.send({
        embeds:[
            new Discord.MessageEmbed()
            .setAuthor({name:`Added by ${song.user.username}`,iconURL:song.user.avatarURL()})
            .setTitle(song.name)
            .setThumbnail(song.thumbnail)
            .setURL(song.url)
            .addFields([
                {
                    name: '**Likes | Views**',
                    value: `**${utils.roundNumber(song.likes)} | ${utils.roundNumber(song.views)}**`,
                    inline: true
                },
                {
                    name:"**Duration | Position**",
                    value:`**${song.formattedDuration} | ${queue.songs.length}**`,
                    inline: true
                }
            ])
            .setFooter({text:`Volume: ${queue.volume}% | Loop: ${queue.repeatMode ? queue.repeatMode == 2 ? "All Queue" : "This Song" : "Off"}`})
        ]
    })
})

Discord.js 13.15.0 Distube 3.3.4 Node 18.14.2

UPDATE

To address this issue Upgrade to the most recent version of distube

Answer №1

It appears that there may be a version conflict with a node_module, potentially related to distube/voice. However, specifying this is not necessary. Please refer to the following list of my package versions that are in perfect working condition.

"dependencies": {
    "@discordjs/opus": "^0.8.0",
    "@distube/soundcloud": "^1.2.1",
    "@distube/spotify": "^1.5.1",
    "@distube/yt-dlp": "^1.1.3",
    "discord.js": "^14.0.3",
    "distube": "^4.0.4",
    "dotenv": "10.0.0",
    "ffmpeg-static": "^4.4.1",
    "libsodium-wrappers": "^0.7.10"
  }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Trouble encountered with bootstrap toggling when multiple identical inputs are used

Problem with Bootstrap toggle not working on multiple identical inputs unless the first input is pressed. Even then, not all inputs are checked/unchecked. I've created a small example I want to ensure that when one input is toggled, all others have ...

Encountering a "Cannot GET" error when utilizing mongoose

Details of my router.js file: const express = require("express") const Note = require("../models/nodeModel") const router = express.Router() router.route("/notes").get((req, res) => { Note.find({ show_day: "2020-9-10" }) .then(foundNotes ...

Enhancing JSON data in Datatables with additional text

I'm currently looking for a way to insert some text into my data before generating a table using jQuery DataTables. As an example, if my JSON data looks like [1,5,6,12], I would like it to be displayed as [1 seconds, 5 seconds, 6 seconds, 12 seconds] ...

What is the best way to extract specific data from a JSON file based on a chosen property using AngularJS and the $http.get method?

I am working with a JSON file that contains color information like this: { "colorsArray":[{ "colorName":"red", "hexValue":"#f00" }, { "colorName":"green", "hexValue":"#0f0" }, { "colorName":"blue", "hexValue":"#00f" }, ...

Generating identical circles using PointsMaterial and CircleGeometry

My goal is to generate circles using two different methods: By utilizing a circle sprite and drawing it with Points and PointsMaterial Using basic circle buffer geometries Unfortunately, I am facing challenges trying to align them due to the size discrep ...

End the response after sending with res.send() within the module

I am in the process of developing a module for validating requests that come through req.body. Instead of repeating the same code snippet in every server request, I aim to consolidate it into a single line within a module. const errors = validationResult( ...

Leveraging Vue.js to preload data with client-side rendering

When it comes to server-side rendering in Vue, like with Nuxt, the process involves grabbing data using the serverPrefetch() function and rendering content on the server side. This allows for the request to return data to the user only after the initial do ...

The Query.formatError message indicates that there is an issue with the 'users.email' column in the where clause of the database query

I'm having some trouble with a piece of code. Here's my signup function : exports.signup = (req, res) => { // Adding User to Database console.log("Processing func -> SignUp"); User.create({ name: req.body.name, username: req.body. ...

"Learn how to create a scrolling div using a combination of CSS and JavaScript with absolute and relative

After relying solely on "pre-made" components like Mui or TailWind, I decided to create a component using only CSS and maybe JavaScript. However, I encountered some difficulties when attempting to position a div inside an image using relative and absolute ...

Interactive Thumbnail Previews

There seems to be an issue with the thumbnail links on my page. The leftmost and rightmost links work fine, but the middle ones are not functioning properly when clicked. The PHP code used to generate these links is the same for all of them, so it's p ...

The MUI Grid design features information displayed on the left side, accompanied by an image placed directly to the right

In the React MUI V5 sample code below, I am creating a profile page layout with details of a person displayed on the left side of the page in label/value format. My question is how to position an "IMAGE" entry (assume it's a 300px x 300px profile ima ...

The styles applied to the Angular 5 Component host element are not being reflected correctly in jsPlumb

As a beginner in Angular >2 development, I am excited to build my first application from scratch. One of the features I'm trying to implement is drawing flow charts using jsPlumb. However, I have encountered an issue where the connectors are not be ...

Adding various image files to the canvas

I am facing an issue with my code where I need to find images inserted by the user into a div and then combine them into one image in a canvas when the "snap" button is clicked. While I can successfully locate, position, and resize the images inside the ca ...

Exploring the world of jQuery and Ajax: Experimenting with implementing a POST method through Ajax and retrieving the response in HTML

Hey guys, I'm currently attempting to set up a basic HTML post method using Ajax. Take a look at the code snippet below: <?PHP function fetchInstagramData($url) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => ...

How to insert space after every item generated by ng-repeat in AngularJS

I'm looking to evenly distribute elements based on this inquiry How to distribute li elements equally? I am utilizing angular with jade: ul li(ng-repeat="item in items") {{item.name}} However, ng-repeat does not create newlines after each element ...

Adding a specific element to an array using JQuery

I am in the process of developing a web application using jQuery to track goals and habits. Users can set a main goal such as 'Discipline' and then add sub-goals or habits related to that main goal (e.g. 'exercise every day'). Organizi ...

The server encountered a "Cannot GET /socket.io" error while trying

I am experiencing an issue with my app that uses express/socket.io. The app is running smoothly without any errors, but when I make an http-request, I receive the following error message: GET http://xxxxxxx.com:3035/socket.io/1/?t=1449090610579 400 (Bad R ...

Tips for fading an image as you scroll using CSS and JavaScript?

I have been dedicating my day to mastering the art of website development. However, I am facing a challenge that is proving to be quite difficult. I am looking to create a smooth transition effect where an image gradually blurs while scrolling down, and re ...

While observing a camera in motion, the particles tinted by texture display sporadic flickering on WebGL and Three.js

Check out this jsfiddle I created to illustrate an issue with particles "flickering" when colored using a texture and the camera is moving. Update: The problem occurs even when there is no animation or movement on the particles. If you notice flickering o ...

Outputting data stored in Firestore object

Is there a way to display the content of a Firestore object in Angular Firebase? I am working on a project where I need to retrieve and print the name of a document stored in Firestore. In my Firestore database, I have a parent collection called "nforms" w ...