From 67a9c8325c985d3acecba3cdfd99466077ff16fc Mon Sep 17 00:00:00 2001 From: Joonas Date: Sat, 11 Feb 2023 14:56:21 +0200 Subject: [PATCH] if invidious returns nothing --- commands/yts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/yts.js b/commands/yts.js index ead092b..378d832 100644 --- a/commands/yts.js +++ b/commands/yts.js @@ -23,6 +23,11 @@ const command = { console.log("Error fetching from invidious: " + err.message) ); + if (!data) { + await client.say(msg.channelName, `${msg.displayName}, nothing found`); + return; + } + await client.say( msg.channelName, `${msg.displayName}, YouTube video with search term: ${splitted