From f37beb0a5d1c104dbb8930f541f749de849013da Mon Sep 17 00:00:00 2001 From: Chris Plaatjes Date: Wed, 15 Feb 2023 10:05:30 -0500 Subject: [PATCH] Removed try/catch it broke --- TelegramListener.cs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/TelegramListener.cs b/TelegramListener.cs index 1c90eed..3fb63f2 100644 --- a/TelegramListener.cs +++ b/TelegramListener.cs @@ -55,22 +55,15 @@ namespace TeleTok // Passes the url along to the video downloader if it is valid AND a tiktok link if (isUri) { - try + if(messageText.Contains("tiktok.com")) { - if(messageText.Contains("tiktok.com")) - { - proxyUrl = VidDownload.TikTokURL(messageText); + proxyUrl = VidDownload.TikTokURL(messageText); - Message ttVideo = await botClient.SendVideoAsync( - chatId: chatId, - video: proxyUrl, - cancellationToken: cancellationToken - ); - } - } - catch - { - Console.WriteLine("Valid TikTok URI was sent, but was not a video!"); + Message ttVideo = await botClient.SendVideoAsync( + chatId: chatId, + video: proxyUrl, + cancellationToken: cancellationToken + ); } } }