Merge branch 'main' of git.kizaing.ca:kizaing/TeleTok
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone Build encountered an error

This commit is contained in:
Chris Plaatjes 2023-02-14 15:07:27 -05:00
commit 1949c7af1b

View File

@ -55,15 +55,22 @@ namespace TeleTok
// Passes the url along to the video downloader if it is valid AND a tiktok link // Passes the url along to the video downloader if it is valid AND a tiktok link
if (isUri) if (isUri)
{ {
if(messageText.Contains("tiktok.com")) try
{ {
proxyUrl = VidDownload.TikTokURL(messageText); if(messageText.Contains("tiktok.com"))
{
proxyUrl = VidDownload.TikTokURL(messageText);
Message ttVideo = await botClient.SendVideoAsync( Message ttVideo = await botClient.SendVideoAsync(
chatId: chatId, chatId: chatId,
video: proxyUrl, video: proxyUrl,
cancellationToken: cancellationToken cancellationToken: cancellationToken
); );
}
}
catch
{
Console.WriteLine("Valid TikTok URI was sent, but was not a video!");
} }
} }
} }