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`];