Advertisement
NyanNyanCodeplay

Discord TikTok Bot

Aug 24th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 25.27 KB | None | 0 0
  1. // v4.0
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Threading;
  8. using System.Net;
  9. using System.IO;
  10. using System.Collections.Specialized;
  11.  
  12. namespace TikTok_Bot
  13. {
  14.     class Program
  15.     {
  16.         public static void Main(string[] args)
  17.         {
  18.             bool devMode = true;
  19.             //string filePathMain = @"C:\Users\Ben\Desktop\temp\code\TikTok (Bot)\for k\";
  20.             string filePathMain = @"C:\Active Bots\TikTok Bot self\";
  21.             //dev time settings options in initializeSettingsVar()
  22.             if (!devMode)
  23.                 filePathMain = AppDomain.CurrentDomain.BaseDirectory;
  24.             settingsStruct settings = new settingsStruct();
  25.             initializeSettingsVar(filePathMain, devMode, ref settings);
  26.             Thread.Sleep(settings.startDelaySeconds * 1000);
  27.             List<tikTokPersonsStruct> tikTokPersonsList = new List<tikTokPersonsStruct>();
  28.             initializeTikTokPersonsList(filePathMain, ref tikTokPersonsList);
  29.             int indexPerson = 0;
  30.             bool newVideoAvailable = false;
  31.             bool anyNewVideoAvailable = false;
  32.             while (true)
  33.             {
  34.                 Thread.Sleep(settings.checkFrequencySeconds * 1000);
  35.                 anyNewVideoAvailable = false;
  36.                 for (indexPerson = 0; indexPerson < tikTokPersonsList.Count; indexPerson++)
  37.                 {
  38.                     getVideoUrlCurrent(filePathMain, indexPerson, ref tikTokPersonsList, settings);
  39.                     newVideoAvailable = checkNewVideo(filePathMain, indexPerson, ref tikTokPersonsList, settings);
  40.                     if (newVideoAvailable)
  41.                     {
  42.                         anyNewVideoAvailable = true;
  43.                         createDiscordPost(filePathMain, indexPerson, ref tikTokPersonsList, settings);
  44.                     }
  45.                 }
  46.                 if (!settings.postToDiscord && !anyNewVideoAvailable)
  47.                     break;
  48.             }
  49.         }
  50.         public static void createDiscordPost(string filePathMain, int indexPerson, ref List<tikTokPersonsStruct> tikTokPersonsList, settingsStruct settings)
  51.         {
  52.             int indexUrl = 0;
  53.             for (indexUrl = 0; indexUrl < tikTokPersonsList[indexPerson].videoUrlCurrentList.Count; indexUrl++)
  54.             {
  55.                 DateTime lastVideoTime = DateTime.Parse(tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(19, 19));
  56.                 DateTime currentTime = DateTime.Parse(tikTokPersonsList[indexPerson].timeStamp);
  57.                 int result = DateTime.Compare(lastVideoTime, currentTime);
  58.                 if (result == 1)
  59.                     break;
  60.             }
  61.             string embedHtml = "";
  62.             string videoTitle = "";
  63.             string videoWatermarkUrl = "";
  64.             int indexTitleStart = 0;
  65.             int indexUrlStart = 0;
  66.             int attempts = 0;
  67.             bool success = false;
  68.             while (!success && attempts < 20)
  69.             {
  70.                 try
  71.                 {
  72.                     Thread.Sleep(settings.webConnectPause * 1000);
  73.                     HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("https://www.tiktok.com/embed/" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19));
  74.                     myRequest.Method = "GET";
  75.                     myRequest.UserAgent = "Mozilla/5.0";
  76.                     myRequest.Timeout = settings.webHtmlDownloadTimeout * 1000;
  77.                     myRequest.ReadWriteTimeout = settings.webHtmlDownloadTimeout * 1000;
  78.                     WebResponse myResponse = myRequest.GetResponse();
  79.                     StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);
  80.                     embedHtml = sr.ReadToEnd();
  81.                     sr.Close();
  82.                     myResponse.Close();
  83.                     indexTitleStart = 0;
  84.                     indexUrlStart = 0;
  85.                     for (int i = 0; i < embedHtml.Length; i++)
  86.                     {
  87.                         if (embedHtml.Substring(i, 11) == ":{\"urls\":[\"")
  88.                             indexUrlStart = i + 11;
  89.                         if (embedHtml.Substring(i, 13) == "\"],\"videoMeta")
  90.                         {
  91.                             videoWatermarkUrl = embedHtml.Substring(indexUrlStart, i - indexUrlStart);
  92.                         }
  93.                         if (embedHtml.Substring(i, 11) == "class=\"text")
  94.                             indexTitleStart = i + 13;
  95.                         if (embedHtml.Substring(i, 19) == "</div></a><a href=\"" && embedHtml.Substring(i, 21) != "</div></a><a href=\"/@")
  96.                         {
  97.                             videoTitle = embedHtml.Substring(indexTitleStart, i - indexTitleStart);
  98.                             success = true;
  99.                             break;
  100.                         }
  101.                     }
  102.                 }
  103.                 catch (Exception e)
  104.                 {
  105.                     writoToErrorLog(filePathMain, e.ToString(), " <489652> ");
  106.                 }
  107.                 attempts++;
  108.             }
  109.             if (!success)
  110.                 return;
  111.             string api2VideoSourceUrl = getApi2VideoSourceUrl(videoWatermarkUrl, filePathMain, tikTokPersonsList, indexPerson, indexUrl, settings);
  112.             if (api2VideoSourceUrl == "")
  113.                 return;
  114.             string videoSourceUrl = "";
  115.             attempts = 0;
  116.             bool fileCorrupted = true;
  117.             while (fileCorrupted && attempts < 20)
  118.             {
  119.                 try
  120.                 {
  121.                     Thread.Sleep(settings.webConnectPause * 1000);
  122.                     HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(api2VideoSourceUrl);
  123.                     myRequest.UserAgent = "Mozilla/5.0";
  124.                     myRequest.Timeout = settings.webHtmlDownloadTimeout * 1000;
  125.                     myRequest.ReadWriteTimeout = settings.webHtmlDownloadTimeout * 1000;
  126.                     using (WebResponse myResponse = (HttpWebResponse)myRequest.GetResponse())
  127.                     {
  128.                         videoSourceUrl = myResponse.ResponseUri.ToString();
  129.                     }
  130.                 }
  131.                 catch (Exception e)
  132.                 {
  133.                     writoToErrorLog(filePathMain, e.ToString(), " <845612> ");
  134.                 }
  135.                 try
  136.                 {
  137.                     Thread.Sleep(settings.webConnectPause * 1000);
  138.                     HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(videoSourceUrl);
  139.                     myRequest.Timeout = settings.webVideoDownloadTimeout * 1000;
  140.                     myRequest.ReadWriteTimeout = settings.webVideoDownloadTimeout * 1000;
  141.                     using (var myResponse = (HttpWebResponse)myRequest.GetResponse())
  142.                     {
  143.                         using (Stream file = File.Create(filePathMain + @"TikTok Videos\" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4"))
  144.                         {
  145.                             myResponse.GetResponseStream().CopyTo(file);
  146.                         }
  147.                     }
  148.                     long fileSize = new FileInfo(filePathMain + @"TikTok Videos\" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4").Length;
  149.                     if (fileSize > 50000)
  150.                         fileCorrupted = false;
  151.                 }
  152.                 catch (Exception e)
  153.                 {
  154.                     writoToErrorLog(filePathMain, e.ToString(), " <987984> ");
  155.                 }
  156.                 attempts++;
  157.             }
  158.             if (fileCorrupted)
  159.                 return;
  160.             success = false;
  161.             string watermarkString = "";
  162.             if (tikTokPersonsList[indexPerson].discordWatermark == "discordWatermark=true")
  163.                 watermarkString = "watermark";
  164.             if (settings.postToDiscord == true)
  165.             {
  166.                 long fileSize = new FileInfo(filePathMain + @"TikTok Videos\" + watermarkString + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4").Length;
  167.                 if (fileSize < 8000000)
  168.                 {
  169.                     try
  170.                     {
  171.                         using (WebClient webClient = new WebClient())
  172.                         {
  173.                             var valuePairs = new NameValueCollection
  174.                             {
  175.                                 {"content", videoTitle + " <https://m.tiktok.com/v/" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ">"}
  176.                             };
  177.                             for (int i = 0; i < tikTokPersonsList[indexPerson].webhooksList.Count; i++)
  178.                             {
  179.                                 Thread.Sleep(settings.webConnectPause * 1000);
  180.                                 webClient.UploadValues(tikTokPersonsList[indexPerson].webhooksList[i], valuePairs);
  181.                             }
  182.                         }
  183.                     }
  184.                     catch (Exception e)
  185.                     {
  186.                         writoToErrorLog(filePathMain, e.ToString(), " <564123> ");
  187.                     }
  188.                     try
  189.                     {
  190.                         using (WebClient webClient = new WebClient())
  191.                         {
  192.                             for (int i = 0; i < tikTokPersonsList[indexPerson].webhooksList.Count; i++)
  193.                             {
  194.                                 Thread.Sleep(settings.webConnectPause * 1000);
  195.                                 webClient.UploadFile(tikTokPersonsList[indexPerson].webhooksList[i], filePathMain + @"TikTok Videos\" + watermarkString + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4");
  196.                             }
  197.                         }
  198.                         success = true;
  199.                     }
  200.                     catch (Exception e)
  201.                     {
  202.                         writoToErrorLog(filePathMain, e.ToString(), " <654165> ");
  203.                     }
  204.                 }
  205.                 else
  206.                 {
  207.                     try
  208.                     {
  209.                         using (WebClient webClient = new WebClient())
  210.                         {
  211.                             var valuePairs = new NameValueCollection
  212.                             {
  213.                                 {"content", "https://m.tiktok.com/v/" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19)}
  214.                             };
  215.                             for (int i = 0; i < tikTokPersonsList[indexPerson].webhooksList.Count; i++)
  216.                             {
  217.                                 Thread.Sleep(settings.webConnectPause * 1000);
  218.                                 webClient.UploadValues(tikTokPersonsList[indexPerson].webhooksList[i], valuePairs);
  219.                             }
  220.                         }
  221.                         success = true;
  222.                     }
  223.                     catch (Exception e)
  224.                     {
  225.                         writoToErrorLog(filePathMain, e.ToString(), " <987891> ");
  226.                     }
  227.                 }
  228.             }
  229.             else
  230.                 success = true;
  231.             if (!success)
  232.                 return;
  233.             watermarkString = "";
  234.             if (tikTokPersonsList[indexPerson].folderWatermark == "folderWatermark=true")
  235.                 watermarkString = "watermark";
  236.             try
  237.             {
  238.                 try
  239.                 {
  240.                     if (!File.Exists(tikTokPersonsList[indexPerson].folderLocation + Convert.ToString(tikTokPersonsList[indexPerson].fileNameNumber + 1) + "-.mp4"))
  241.                     {
  242.                         File.Copy(filePathMain + @"TikTok Videos\" + watermarkString + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4", tikTokPersonsList[indexPerson].folderLocation + Convert.ToString(tikTokPersonsList[indexPerson].fileNameNumber + 1) + "-.mp4");
  243.                     }
  244.                 }
  245.                 catch
  246.                 {
  247.                 }
  248.                 File.Delete(filePathMain + @"TikTok Videos\" + "watermark" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4");
  249.                 File.Delete(filePathMain + @"TikTok Videos\" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4");
  250.                 var tikTokPersonsVar = tikTokPersonsList[indexPerson];
  251.                 tikTokPersonsVar.timeStamp = tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(19, 19);
  252.                 tikTokPersonsVar.fileNameNumber++;
  253.                 tikTokPersonsList[indexPerson] = tikTokPersonsVar;
  254.                 updateTikTokPersonsFile(filePathMain, tikTokPersonsList);
  255.             }
  256.             catch (Exception e)
  257.             {
  258.                 writoToErrorLog(filePathMain, e.ToString(), " <894412> ");
  259.             }
  260.         }
  261.         public static void updateTikTokPersonsFile(string filePathMain, List<tikTokPersonsStruct> tikTokPersonsList)
  262.         {
  263.             using (StreamWriter fileWrite = new StreamWriter(filePathMain + "TikTok Persons.txt"))
  264.             {
  265.                 for (int indexPerson = 0; indexPerson < tikTokPersonsList.Count; indexPerson++)
  266.                 {
  267.                     fileWrite.WriteLine(tikTokPersonsList[indexPerson].username);
  268.                     fileWrite.WriteLine(tikTokPersonsList[indexPerson].timeStamp);
  269.                     fileWrite.WriteLine(tikTokPersonsList[indexPerson].discordWatermark);
  270.                     fileWrite.WriteLine(tikTokPersonsList[indexPerson].folderWatermark);
  271.                     fileWrite.WriteLine(Convert.ToString(tikTokPersonsList[indexPerson].fileNameNumber));
  272.                     fileWrite.WriteLine(tikTokPersonsList[indexPerson].folderLocation);
  273.                     for (int i = 0; i < tikTokPersonsList[indexPerson].webhooksList.Count; i++)
  274.                     {
  275.                         fileWrite.Write(tikTokPersonsList[indexPerson].webhooksList[i] + ", ");
  276.                     }
  277.                     fileWrite.WriteLine();
  278.                 }
  279.             }
  280.         }
  281.         public static string getApi2VideoSourceUrl(string videoWatermarkUrl, string filePathMain, List<tikTokPersonsStruct> tikTokPersonsList, int indexPerson, int indexUrl, settingsStruct settings)
  282.         {
  283.             bool webSuccess = false;
  284.             int webAttempts = 0;
  285.             while (!webSuccess && webAttempts < 20)
  286.             {
  287.                 try
  288.                 {
  289.                     Thread.Sleep(settings.webConnectPause * 1000);
  290.                     HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(videoWatermarkUrl);
  291.                     myRequest.Timeout = settings.webVideoDownloadTimeout * 1000;
  292.                     myRequest.ReadWriteTimeout = settings.webVideoDownloadTimeout * 1000;
  293.                     using (var myResponse = (HttpWebResponse)myRequest.GetResponse())
  294.                     {
  295.                         using (Stream file = File.Create(filePathMain + @"TikTok Videos\watermark" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4"))
  296.                         {
  297.                             myResponse.GetResponseStream().CopyTo(file);
  298.                             webSuccess = true;
  299.                         }
  300.                     }
  301.                 }
  302.                 catch (Exception e)
  303.                 {
  304.                     writoToErrorLog(filePathMain, e.ToString(), " <485451> ");
  305.                 }
  306.                 webAttempts++;
  307.             }
  308.             string api2VideoSourceUrl = "";
  309.             string mp4File = "";
  310.             try
  311.             {
  312.                 using (StreamReader sr = new StreamReader(filePathMain + @"TikTok Videos\watermark" + tikTokPersonsList[indexPerson].videoUrlCurrentList[indexUrl].Substring(0, 19) + ".mp4"))
  313.                 {
  314.                     mp4File = sr.ReadToEnd();
  315.                 }
  316.                 for (int i = 0; i < mp4File.Length - 35; i++)
  317.                 {
  318.                     if (mp4File.Substring(i, 4) == "vid:")
  319.                     {
  320.                         api2VideoSourceUrl = "https://api2.musical.ly/aweme/v1/play/?video_id=" + mp4File.Substring(i + 4, 32) + "&improve_bitrate=1";
  321.                         break;
  322.                     }
  323.                 }
  324.             }
  325.             catch (Exception e)
  326.             {
  327.                 writoToErrorLog(filePathMain, e.ToString(), " <515231> ");
  328.             }
  329.             mp4File = "";
  330.             return api2VideoSourceUrl;
  331.         }
  332.         public static bool checkNewVideo(string filePathMain, int indexPerson, ref List<tikTokPersonsStruct> tikTokPersonsList, settingsStruct settings)
  333.         {
  334.             if (tikTokPersonsList[indexPerson].videoUrlCurrentList.Count == 0)
  335.                 return false;
  336.             try
  337.             {
  338.                 DateTime latestVideoTime = DateTime.Parse(tikTokPersonsList[indexPerson].videoUrlCurrentList[tikTokPersonsList[indexPerson].videoUrlCurrentList.Count - 1].Substring(19, 19));
  339.                 DateTime lastPostTime = DateTime.Parse(tikTokPersonsList[indexPerson].timeStamp);
  340.                 int result = DateTime.Compare(latestVideoTime, lastPostTime);
  341.                 if (result <= 0)
  342.                     return false;
  343.                 else
  344.                     return true;
  345.             }
  346.             catch (Exception e)
  347.             {
  348.                 writoToErrorLog(filePathMain, e.ToString(), " <321446> ");
  349.                 return false;
  350.             }
  351.         }
  352.         public static void getVideoUrlCurrent(string filePathMain, int indexPerson, ref List<tikTokPersonsStruct> tikTokPersonsList, settingsStruct settings)
  353.         {
  354.             string mainHtml = "";
  355.             try
  356.             {
  357.                 Thread.Sleep(settings.webConnectPause * 1000);
  358.                 HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("https://www.tiktok.com/@" + tikTokPersonsList[indexPerson].username);
  359.                 myRequest.Method = "GET";
  360.                 myRequest.UserAgent = "Mozilla/5.0";
  361.                 myRequest.Timeout = settings.webHtmlDownloadTimeout * 1000;
  362.                 myRequest.ReadWriteTimeout = settings.webHtmlDownloadTimeout * 1000;
  363.                 WebResponse myResponse = myRequest.GetResponse();
  364.                 StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8);
  365.                 mainHtml = sr.ReadToEnd();
  366.                 sr.Close();
  367.                 myResponse.Close();
  368.                 string time = "";
  369.                 tikTokPersonsList[indexPerson].videoUrlCurrentList.Clear();
  370.                 for (int i = 0; i < mainHtml.Length - 31 && tikTokPersonsList[indexPerson].videoUrlCurrentList.Count < 9; i++)
  371.                 {
  372.                     if (mainHtml.Substring(i, 6) == "upload")
  373.                     {
  374.                         time = mainHtml.Substring(i + 13, 19);
  375.                     }
  376.                     if (mainHtml.Substring(i, 6) == "embed/")
  377.                     {
  378.                         tikTokPersonsList[indexPerson].videoUrlCurrentList.Add(mainHtml.Substring(i + 6, 19) + time);
  379.                     }
  380.                 }
  381.                 tikTokPersonsList[indexPerson].videoUrlCurrentList.Reverse();
  382.             }
  383.             catch (Exception e)
  384.             {
  385.                 writoToErrorLog(filePathMain, e.ToString(), " <231222> ");
  386.             }
  387.         }
  388.         public static void initializeTikTokPersonsList(string filePathMain, ref List<tikTokPersonsStruct> tikTokPersonsList)
  389.         {
  390.             string[] tikTokPersonsArr = File.ReadAllLines(filePathMain + "TikTok Persons.txt");
  391.             tikTokPersonsList.Clear();
  392.             var tikTokPersonsVar = new tikTokPersonsStruct();
  393.             for (int i = 0; i < tikTokPersonsArr.Length - 1; i += 7)
  394.             {
  395.                 tikTokPersonsVar.username = tikTokPersonsArr[i];
  396.                 tikTokPersonsVar.timeStamp = tikTokPersonsArr[i + 1];
  397.                 tikTokPersonsVar.discordWatermark = tikTokPersonsArr[i + 2];
  398.                 tikTokPersonsVar.folderWatermark = tikTokPersonsArr[i + 3];
  399.                 tikTokPersonsVar.fileNameNumber = Convert.ToInt32(tikTokPersonsArr[i + 4]);
  400.                 tikTokPersonsVar.folderLocation = tikTokPersonsArr[i + 5];
  401.                 if (tikTokPersonsVar.folderLocation.Substring(tikTokPersonsVar.folderLocation.Length - 1, 1) != @"\")
  402.                 {
  403.                     tikTokPersonsVar.folderLocation += @"\";
  404.                 }
  405.                 tikTokPersonsVar.webhooksList = new List<string>();
  406.                 tikTokPersonsVar.webhooksList.Clear();
  407.                 tikTokPersonsVar.webhooksList = (parseWebhooksList(tikTokPersonsArr[i + 6]));
  408.                 tikTokPersonsVar.videoUrlCurrentList = new List<string>();
  409.                 tikTokPersonsVar.videoUrlCurrentList.Clear();
  410.                 tikTokPersonsList.Add(tikTokPersonsVar);
  411.             }
  412.         }
  413.         public static void writoToErrorLog(string filePathMain, string errorMessage, string errorID)
  414.         {
  415.             long fileSize = new FileInfo(filePathMain + "error log.txt").Length;
  416.             if (fileSize > 50000000)
  417.             {
  418.                 using (StreamWriter fileWrite = new StreamWriter(filePathMain + "error log.txt"))
  419.                 {
  420.                     fileWrite.Write("");
  421.                 }
  422.             }
  423.             using (StreamWriter fileWrite = File.AppendText(filePathMain + "error log.txt"))
  424.             {
  425.                 fileWrite.WriteLine(DateTime.UtcNow.ToString("yyyy/MM/dd HH:mm:ss") + errorID + errorMessage);
  426.             }
  427.         }
  428.         public static List<string> parseWebhooksList(string webhooksString)
  429.         {
  430.             List<string> webhooksList = new List<string>();
  431.             webhooksList.Clear();
  432.             string individualWebhook = "";
  433.             for (int i = 0; i < webhooksString.Length - 35; i++)
  434.             {
  435.                 if (webhooksString.Substring(i, 36) == "https://discordapp.com/api/webhooks/")
  436.                 {
  437.                     individualWebhook = webhooksString.Substring(i + 36, 87);
  438.                     webhooksList.Add("https://discordapp.com/api/webhooks/" + individualWebhook);
  439.                 }
  440.             }
  441.             return webhooksList;
  442.         }
  443.         public static void initializeSettingsVar(string filePathMain, bool devMode, ref settingsStruct settings)
  444.         {
  445.             string[] settingsArr = File.ReadAllLines(filePathMain + "settings.txt");
  446.             settings.startDelaySeconds = Convert.ToInt32(settingsArr[0]);
  447.             settings.checkFrequencySeconds = Convert.ToInt32(settingsArr[1]);
  448.             settings.webConnectPause = Convert.ToInt32(settingsArr[2]);
  449.             settings.webHtmlDownloadTimeout = Convert.ToInt32(settingsArr[3]);
  450.             settings.webVideoDownloadTimeout = Convert.ToInt32(settingsArr[4]);
  451.             if (settingsArr[5] == "postToDiscord=true")
  452.                 settings.postToDiscord = true;
  453.             else
  454.                 settings.postToDiscord = false;
  455.             if (devMode)
  456.             {
  457.                 settings.startDelaySeconds = 0;
  458.                 settings.checkFrequencySeconds = 0;
  459.                 settings.webConnectPause = 0;
  460.                 settings.webHtmlDownloadTimeout = 5;
  461.                 settings.webVideoDownloadTimeout = 10;
  462.             }
  463.         }
  464.         public struct settingsStruct
  465.         {
  466.             public int startDelaySeconds;
  467.             public int checkFrequencySeconds;
  468.             public int webConnectPause;
  469.             public int webHtmlDownloadTimeout;
  470.             public int webVideoDownloadTimeout;
  471.             public bool postToDiscord;
  472.         }
  473.         public struct tikTokPersonsStruct
  474.         {
  475.             public string username;
  476.             public string timeStamp;
  477.             public string discordWatermark;
  478.             public string folderWatermark;
  479.             public int fileNameNumber;
  480.             public string folderLocation;
  481.             public List<string> webhooksList;
  482.             public List<string> videoUrlCurrentList;
  483.         }
  484.     }
  485. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement