Fix soundcloud.getSongInfo is not a function (#182)
🐛 Fix soundcloud.getSongInfo is not a function
This commit is contained in:
parent
f760d955aa
commit
9e2f0acdc2
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ const Queue = require('./Queue')
|
||||||
const Track = require('./Track')
|
const Track = require('./Track')
|
||||||
const Util = require('./Util')
|
const Util = require('./Util')
|
||||||
const { EventEmitter } = require('events')
|
const { EventEmitter } = require('events')
|
||||||
|
const Client = new soundcloud.Client()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef Filters
|
* @typedef Filters
|
||||||
|
@ -155,7 +156,7 @@ class Player extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (queryType === 'soundcloud-song') {
|
} else if (queryType === 'soundcloud-song') {
|
||||||
const soundcloudData = await soundcloud.getSongInfo(query).catch(() => {})
|
const soundcloudData = await Client.getSongInfo(query).catch(() => {})
|
||||||
if (soundcloudData) {
|
if (soundcloudData) {
|
||||||
updatedQuery = `${soundcloudData.author.name} - ${soundcloudData.title}`
|
updatedQuery = `${soundcloudData.author.name} - ${soundcloudData.title}`
|
||||||
queryType = 'youtube-video-keywords'
|
queryType = 'youtube-video-keywords'
|
||||||
|
|
Loading…
Reference in a new issue