From 0471843362b4718c52f0964c011cb9de0fd6a04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?FAY=E3=82=B7?= <103030954+FAYStarNext@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:16:26 +0700 Subject: [PATCH] chore: Update search method parameters in Player and TrackUtils --- src/structures/Player.ts | 5 ++++- src/structures/Utils.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/structures/Player.ts b/src/structures/Player.ts index 7c12eaf..c3da295 100644 --- a/src/structures/Player.ts +++ b/src/structures/Player.ts @@ -113,7 +113,10 @@ export class Player { * @param requester */ public search(query: string | SearchQuery, requester?: User | ClientUser): Promise { - return this.manager.search(query, requester); + return this.manager.search({ + query: query as string, + requester: requester, + }); } /** Connect to the voice channel. */ diff --git a/src/structures/Utils.ts b/src/structures/Utils.ts index d3797f0..c1e9b0b 100644 --- a/src/structures/Utils.ts +++ b/src/structures/Utils.ts @@ -157,7 +157,10 @@ export abstract class TrackUtils { if (!TrackUtils.isUnresolvedTrack(unresolvedTrack)) throw new RangeError("Provided track is not a UnresolvedTrack."); const query = unresolvedTrack.uri ? unresolvedTrack.uri : [unresolvedTrack.author, unresolvedTrack.title].filter(Boolean).join(" - "); - const res = await TrackUtils.manager.search(query, unresolvedTrack.requester); + const res = await TrackUtils.manager.search({ + query, + requester: unresolvedTrack.requester, + }); if (unresolvedTrack.author) { const channelNames = [unresolvedTrack.author, `${unresolvedTrack.author} - Topic`];