Compare commits
	
		
			2 Commits
		
	
	
		
			8ffd920007
			...
			f37beb0a5d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					f37beb0a5d | ||
| 
						 | 
					eec1050e17 | 
@@ -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
 | 
			
		||||
                    );
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -12,13 +12,15 @@ namespace TeleTok
 | 
			
		||||
            string url = videourl;
 | 
			
		||||
            string proxyUrl;
 | 
			
		||||
 | 
			
		||||
            DateTime now =DateTime.Now;
 | 
			
		||||
 | 
			
		||||
            if(url.Contains("vm.tiktok.com"))
 | 
			
		||||
            {
 | 
			
		||||
                url = UnshortenUrl(url);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            proxyUrl = TeleTok.ptInstance + "/download?url=" + url;
 | 
			
		||||
            Console.WriteLine("Video for " + url + " has been sent..");
 | 
			
		||||
            Console.WriteLine("[" + now.ToString() + "] " + "Video for " + url + " has been sent..");
 | 
			
		||||
 | 
			
		||||
            return proxyUrl;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user