From 5b777fa8585d165536d7ebadfc52eeefba32b8d5 Mon Sep 17 00:00:00 2001 From: CPU Date: Mon, 3 Jan 2022 22:53:49 +0100 Subject: [PATCH] Updated version and made sure you get a valid error if you forgot the bot token as parameter --- UPBot Code/Program.cs | 11 ++++++----- UPBot Code/Utils.cs | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/UPBot Code/Program.cs b/UPBot Code/Program.cs index 3844b60..2c1ac5b 100644 --- a/UPBot Code/Program.cs +++ b/UPBot Code/Program.cs @@ -1,11 +1,9 @@ using System; -using System.Collections.Generic; using System.IO; using System.Reflection; using System.Threading.Tasks; using DSharpPlus; using DSharpPlus.CommandsNext; -using DSharpPlus.Entities; using DSharpPlus.Interactivity; using DSharpPlus.Interactivity.Extensions; @@ -13,12 +11,15 @@ namespace UPBot { class Program { static StreamWriter lw = null; static void Main(string[] args) { - - - lw = File.CreateText(args.Length >= 3 ? args[2] : "debug.log"); lw.WriteLine("Log Started. Woho."); lw.Flush(); + if (args.Length < 1) { + lw.WriteLine("You have to specify the bot token as first parameter!"); + lw.Flush(); + return; + } + MainAsync(args[0], (args.Length > 1 && args[1].Length > 0) ? args[1] : "\\").GetAwaiter().GetResult(); } diff --git a/UPBot Code/Utils.cs b/UPBot Code/Utils.cs index 42c9439..f3c0345 100644 --- a/UPBot Code/Utils.cs +++ b/UPBot Code/Utils.cs @@ -12,7 +12,7 @@ /// public static class Utils { - public const int vmajor = 0, vminor = 1, vbuild = 2; + public const int vmajor = 0, vminor = 1, vbuild = 4; /// @@ -31,7 +31,7 @@ public static class Utils private static DiscordGuild guild; public static string GetVersion() { - return vmajor + "." + vminor + "." + vbuild + " - 2021/08/26"; + return vmajor + "." + vminor + "." + vbuild + "b - 2022/01/03"; } /// @@ -44,7 +44,7 @@ public static DiscordMember GetMyself() { } /// - /// Gets the UNitedProgramming Guild + /// Gets the UnitedProgramming Guild /// /// public static DiscordGuild GetGuild() {