From 9e2f0acdc2af5f124079983609f7ee52f5785772 Mon Sep 17 00:00:00 2001 From: hands8142 <46277532+hands8142@users.noreply.github.com> Date: Wed, 2 Dec 2020 15:19:32 +0900 Subject: [PATCH] Fix soundcloud.getSongInfo is not a function (#182) :bug: Fix soundcloud.getSongInfo is not a function --- src/Player.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index 3961c5a..457c49c 100644 --- a/src/Player.js +++ b/src/Player.js @@ -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'