Fix soundcloud.getSongInfo is not a function (#182)

🐛 Fix soundcloud.getSongInfo is not a function
This commit is contained in:
hands8142 2020-12-02 15:19:32 +09:00 committed by GitHub
parent f760d955aa
commit 9e2f0acdc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ const Queue = require('./Queue')
const Track = require('./Track')
const Util = require('./Util')
const { EventEmitter } = require('events')
const Client = new soundcloud.Client()
/**
* @typedef Filters
@ -155,7 +156,7 @@ class Player extends EventEmitter {
}
}
} else if (queryType === 'soundcloud-song') {
const soundcloudData = await soundcloud.getSongInfo(query).catch(() => {})
const soundcloudData = await Client.getSongInfo(query).catch(() => {})
if (soundcloudData) {
updatedQuery = `${soundcloudData.author.name} - ${soundcloudData.title}`
queryType = 'youtube-video-keywords'