Skip to content

Commit

Permalink
Changed the way the Configurator variables are printed to console
Browse files Browse the repository at this point in the history
Added the date and time to the information printed to the console
  • Loading branch information
MythicalCuddles committed Nov 24, 2019
1 parent 9de082e commit d9b4e51
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions DiscordBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,30 @@ public static void Main(string[] args) // Entry point to the program.
private static async void StartBot(string[] args) // Startup Method.
{
// Print Application Information to Console.
Console.Write(@"DiscordBot: [");
Console.Write($@"{DateTime.Now,-19} DiscordBot: [");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write(@"Version " + ProgramVersion.Major + @"." + ProgramVersion.Minor + @"." +
ProgramVersion.Build + @"." + ProgramVersion.Revision);
Console.ResetColor();
Console.WriteLine(@"] ");

// Print Developer Information to Console.
Console.Write(@"Developed by Melissa Brennan (");
Console.Write($@"{DateTime.Now,-19} DiscordBot: Developed by Melissa Brennan (");
Console.ForegroundColor = ConsoleColor.Magenta;
Console.Write(@"@MythicalCuddles");
Console.ResetColor();
Console.WriteLine(@")");

// Print Additional Information to the Console.
Console.WriteLine(@"Web: www.mythicalcuddles.xyz");
Console.WriteLine(@"Copyright 2017 - 2019 Melissa Brennan | Licensed under the MIT License.");
Console.WriteLine($@"{DateTime.Now,-19} DiscordBot: Web: www.mythicalcuddles.xyz");
Console.WriteLine($@"{DateTime.Now,-19} DiscordBot: Copyright 2017 - 2019 Melissa Brennan | Licensed under the MIT License.");

Methods.PrintConsoleSplitLine();

// Run the Initializer for MelissaNET.
MelissaNet.MelissaNet.Initialize();

Methods.PrintConsoleSplitLine();

// Check for Updates using MelissaNet.
CheckForUpdates();
Expand All @@ -75,8 +79,15 @@ private static async void StartBot(string[] args) // Startup Method.
// Check & Run the configurator form if the configuration has not been setup or the -config arg has been passed.
bool configArg = args.Contains("-CONFIG");
await new LogMessage(LogSeverity.Debug, "Configurator",
"configArg: " + configArg.ToYesNo() + " | FirstTimeRun: " + Configuration.Load().FirstTimeRun.ToYesNo() + " | invalidToken: " +
invalidToken.ToYesNo() + " | invalidDbSettings: " + invalidDbSettings.ToYesNo()).PrintToConsole();
"Checking if the Configurator needs to run...").PrintToConsole();
await new LogMessage(LogSeverity.Debug, "Configurator",
"configArg: " + configArg.ToYesNo()).PrintToConsole();
await new LogMessage(LogSeverity.Debug, "Configurator",
"FirstTimeRun: " + Configuration.Load().FirstTimeRun.ToYesNo()).PrintToConsole();
await new LogMessage(LogSeverity.Debug, "Configurator",
"invalidToken: " + invalidToken.ToYesNo()).PrintToConsole();
await new LogMessage(LogSeverity.Debug, "Configurator",
"invalidDbSettings: " + invalidDbSettings.ToYesNo()).PrintToConsole();
FrmConfigure.CheckRunConfigurator(configArg || Configuration.Load().FirstTimeRun || invalidToken || invalidDbSettings);

Methods.PrintConsoleSplitLine();
Expand Down

0 comments on commit d9b4e51

Please sign in to comment.