Skip to content

Commit

Permalink
style: Remove unnecessary assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Oct 19, 2024
1 parent c20be99 commit cf8e3ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/library/commands/resolvers/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ async function resolveYouTubeSongListings(

async function search(client: Client, interaction: Logos.Interaction, query: string): Promise<SongListing | undefined> {
const resultsAll = await YouTubeSearch.YouTube.search(query, { limit: 20, type: "all", safeSearch: false });
const results = resultsAll.filter((element) => isPlaylist(element) || isVideo(element)) as Array<
YouTubeSearch.Playlist | YouTubeSearch.Video
>;
const results = resultsAll.filter((element) => isPlaylist(element) || isVideo(element));
if (results.length === 0) {
return undefined;
}
Expand Down

0 comments on commit cf8e3ad

Please sign in to comment.