distubejs / spotify Goto Github PK
View Code? Open in Web Editor NEWA DisTube custom plugin for supporting Spotify.
License: MIT License
A DisTube custom plugin for supporting Spotify.
License: MIT License
Please describe your problem in as much detail as possible:
The Distube options:
{
updateYouTubeDL: false,
youtubeCookie: this.settings.main.cookie,
searchSongs: 10,
emitNewSongOnly: true,
leaveOnStop: false,
plugins: [new SpotifyPlugin(), new SoundCloudPlugin()],
}
Error Message:
DisTubeError [NO_RESULT]: No result found
at DisTube.search (C:\Users\Major\Documents\github\Rayila\node_modules\distube\src\DisTube.ts:329:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[ERROR] 11:46:45 DisTubeError [NO_RESULT]: No result found
<DisTube>.search();
because <DisTube>.playVoiceChannel();
is working fine...
Further information:
Further information:
Error:
D:\BOT ACTIVER DISCORD\Mes bots privé\RadioJap\node_modules@distube\spotify\dist\index.js:45
class SpotifyPlugin extends distube_1.CustomPlugin {
^
TypeError: Class extends value undefined is not a constructor or null
at Object. (D:\BOT ACTIVER DISCORD\Mes bots privé\RadioJap\node_modules@distube\spotify\dist\index.js:45:39)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object. (D:\BOT ACTIVER DISCORD\Mes bots privé\RadioJap\radiojap-dev.js:47:27)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
My code:
const DisTube = require('distube')
const { SpotifyPlugin } = require("@distube/spotify");
const distube = new DisTube(client,
{
ytdlOptions: {
quality: 'highestaudio',
filter: 'audioonly',
},
leaveOnFinish: false,
leaveOnStop: false,
leaveOnEmpty: false,
updateYouTubeDL: true,
searchSongs: true,
emitNewSongOnly: true,
plugins: [
new SpotifyPlugin({
parallel: true,
emitEventsAfterFetching: false,
api: {
clientId: "2f66e4ab0bb94779b6fd3e76fd05ffdb",
clientSecret: "001792c206b14efbbede838640e891d1",
},
})
],
})
Someone can help me ??
Please describe your problem in as much detail as possible:
When I try to play a large spotify playlist (600 songs), it causes my bot to freeze due to a large CPU increase.
I think it would be nice to be able to set a limit of songs you take so the bot doesn't have to load everything.
Further information:
I've added this code to play music from Spotify.
const DisTube = require('distube')
const client = new Discord.Client()
const distube = new DisTube(client, {
searchSongs: 10,
emitNewSongOnly: true,
plugins: [new SpotifyPlugin({ parallel: true })]
})
But it gives this error.
/home/runner/Groover-Beta/node_modules/@distube/spotify/index.js:6
module.exports = class SpotifyPlugin extends CustomPlugin {
^
TypeError: Class extends value undefined is not a constructor or null
I got this error:
postinstall:container: timing audit body Completed in 1m /home/container/node_modules/@distube/spotify/dist/index.js:44
class SpotifyPlugin extends distube_1.CustomPlugin {
TypeError: Class exten
Further information:
what the title says
will check versions later but i think latest
/home/runner/Moderatrix/node_modules/@distube/spotify/index.js:72
if (Array.isArray(queue.songs) && queue.songs[0]?.streamURL) resolve(clearInterval(check));
^
SyntaxError: Unexpected token '.'
I recieve this error when I tried to start my bot
whenever i play a song.. the song plays... no issues but my playSong event is not working :(
I copied the documentation on npmjs.com and i get an error:
TypeError: Class extends value undefined is not a constructor or null
at Object. (C:\Users\Brendon\Desktop\kream-testing\node_modules@distube\spotify\index.js:6:46)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\Brendon\Desktop\kream-testing\index.js:64:23)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Update the dependencies: formidable and superagent, please.
when i want to play a playlist i wil get this error
Musica > TypeError [PlayError]: *******
xx Musica > Cannot read properties of undefined (reading '0')
xx Musica > at SpotifyPlugin.play (/home/tijmen/musica/node_modules/@distube/spotify/dist/index.js:183:36)
xx Musica > at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
xx Musica > at async DisTube.play (/home/tijmen/musica/node_modules/distube/dist/index.js:2264:13)
When i add a playlist to the queue i will get this error
/home/tijmen/musicadev/node_modules/@distube/spotify/dist/index.js:280
if (track.type !== "track")
^
TypeError [PlayError]: https://open.spotify.com/playlist/6nOdNZWcNjURpp2lcMvjDU?si=f9920966151f4e47
Cannot read properties of null (reading 'type')
at /home/tijmen/musicadev/node_modules/@distube/spotify/dist/index.js:280:19
at Array.map ()
at SpotifyPlugin.play (/home/tijmen/musicadev/node_modules/@distube/spotify/dist/index.js:279:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DisTube.play (/home/tijmen/musicadev/node_modules/distube/dist/index.js:2264:13)
Node.js v18.12.1
Further information:
My console always gives me this error:
if (Array.isArray(queue.songs) && queue.songs[0]?.streamURL) resolve(clearInterval(check));
^
SyntaxError: Unexpected token '.'
this error is in the index.js of this plugin
Please describe your problem in as much detail as possible:
Resolving fails when the playlist contains a local file
TypeError: Cannot read properties of undefined (reading 'url')
at SpotifyPlugin.play (../node_modules/@distube/spotify/index.ts:121:40)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Further information:
Please describe your problem in as much detail as possible:
When I play a large spotify playlist, my bot's voice freezes.
I don't understand why there is this problem since my bot does not exceed its CPU limit (it has 4 cores).
I wish I didn't have this problem without having to set the parallel
option to false because otherwise it is too slow to search.
Further information:
Plugin version: 1.2.1
DisTube version: 3.3.2
discord.js version: 13.6.0
Node.js version: 16.13.2
Operating system: Microsoft Windows 11
Please describe your problem in as much detail as possible:
when I launch a music and in the music link the link contains "intl-fr" the bot does not find the music and therefore does not play it.
example link: https://open.spotify.com/intl-fr/track/0HYaC4uGgpx7EIBekhxWfi?si=3d5289545af74ea2
Further information:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.