From a85aa1f96c73a1d3c2a260cfc515eb62bbf22ce2 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Wed, 29 Aug 2018 22:55:01 +0200 Subject: [PATCH] Added startup confirmation to inform the user about selfbots violating discord tos --- Discord Media Loader.Application/Classes/Core.cs | 15 +++++++++++++-- .../Classes/Settings.cs | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Discord Media Loader.Application/Classes/Core.cs b/Discord Media Loader.Application/Classes/Core.cs index c740049..00104dd 100644 --- a/Discord Media Loader.Application/Classes/Core.cs +++ b/Discord Media Loader.Application/Classes/Core.cs @@ -82,7 +82,6 @@ namespace DML.Application.Classes Logger.Trace("Created log folder."); } - var logFile = Path.Combine(logFolder, SweetUtils.LegalizeFilename($"{DateTime.Now.ToString(CultureInfo.CurrentCulture.DateTimeFormat.SortableDateTimePattern)}.log.zip")); @@ -109,6 +108,18 @@ namespace DML.Application.Classes Settings.Store(); } + if (Settings.ShowStartUpHints) + { + if (MessageBox.Show(splash, "This tool is considered as a selfbot which may violate the Discord TOS. By using this tool you take the risk to get your account banned. Although this never happened yet (as far as I know) you have to confirm to this.\n\r\n\rDo you wish to continue?", "HOLD UP!!", MessageBoxButtons.YesNo) != DialogResult.Yes) + { + splash.Close(); + return; + } + + Settings.ShowStartUpHints = false; + Settings.Store(); + } + Logger.Debug("Loading jobs collection out of database..."); Scheduler.JobList = Job.RestoreJobs().ToList(); @@ -175,7 +186,7 @@ namespace DML.Application.Classes if (!string.IsNullOrEmpty(Settings.LoginToken)) { Logger.Debug("Trying to login with last known token..."); - loggedIn= await DMLClient.Login(Settings.LoginToken); + loggedIn = await DMLClient.Login(Settings.LoginToken); } if (!loggedIn) diff --git a/Discord Media Loader.Application/Classes/Settings.cs b/Discord Media Loader.Application/Classes/Settings.cs index a9544ee..906697e 100644 --- a/Discord Media Loader.Application/Classes/Settings.cs +++ b/Discord Media Loader.Application/Classes/Settings.cs @@ -15,6 +15,7 @@ namespace DML.Application.Classes public string FileNameScheme { get; set; } = @"%guild%\%channel%\%id%"; public bool SkipExistingFiles { get; set; } = true; public int ThreadLimit { get; set; } = 50; + public bool ShowStartUpHints { get; set; } = true; public void Store() {