diff --git a/src/.vs/DiscordCLI/v16/.suo b/src/.vs/DiscordCLI/v16/.suo index 48bc75e..90355c5 100644 Binary files a/src/.vs/DiscordCLI/v16/.suo and b/src/.vs/DiscordCLI/v16/.suo differ diff --git a/src/DiscordCLI/Commands.cs b/src/DiscordCLI/Commands.cs index b8d14d7..d058486 100644 --- a/src/DiscordCLI/Commands.cs +++ b/src/DiscordCLI/Commands.cs @@ -179,7 +179,7 @@ namespace DiscordCLI } catch (Exception ex) { - ConsoleExt.WriteLine(ex, ConsoleColor.Red); + ConsoleExt.WriteLine(ex.Message, ConsoleColor.Red); GlobalInformation.currentTextChannel = null; } } diff --git a/src/DiscordCLI/CommandsManager.cs b/src/DiscordCLI/CommandsManager.cs index 5af3111..cf7c488 100644 --- a/src/DiscordCLI/CommandsManager.cs +++ b/src/DiscordCLI/CommandsManager.cs @@ -76,9 +76,18 @@ namespace DiscordCLI else if (GlobalInformation.currentTextChannel != null) { cooldown++; - Console.Write("\r" + new string(' ', Console.WindowWidth)); - await GlobalInformation.currentTextChannel.SendMessageAsync(rawInput); - return (false, false); + + try + { + await GlobalInformation.currentTextChannel.SendMessageAsync(rawInput); + Console.Write("\r" + new string(' ', Console.WindowWidth)); + } + catch (Exception ex) + { + Console.WriteLine(); + ConsoleExt.WriteLine(ex.Message, ConsoleColor.Red); + } + return (false, true); } Console.WriteLine(); diff --git a/src/DiscordCLI/OutputManager.cs b/src/DiscordCLI/OutputManager.cs index b4ef4cc..0ef8585 100644 --- a/src/DiscordCLI/OutputManager.cs +++ b/src/DiscordCLI/OutputManager.cs @@ -158,7 +158,7 @@ namespace DiscordCLI } } - foreach (Match match in Regex.Matches(message, @"((https?)\://|www.)[A-Za-z0-9\.\-]+(/[A-Za-z0-9\?\&\=;\+!'\(\)\*\-\._~%]*)*", RegexOptions.IgnoreCase)) + foreach (Match match in Regex.Matches(message, @"((https?)\:\/\/|www.)[A-Za-z0-9\.\-\&\#\?\/]*", RegexOptions.IgnoreCase)) { message = message.Replace(match.Value, $"\0{match.Value}\0"); } @@ -178,7 +178,6 @@ namespace DiscordCLI else { consoleColor = ClosestConsoleColor(color); - } if (consoleColor == Console.BackgroundColor || consoleColor == ConsoleColor.DarkGray) diff --git a/src/DiscordCLI/Program.cs b/src/DiscordCLI/Program.cs index a22815b..28b03c4 100644 --- a/src/DiscordCLI/Program.cs +++ b/src/DiscordCLI/Program.cs @@ -89,6 +89,7 @@ namespace DiscordCLI outputManager.InputManager = inputManager; await inputManager.ReadInput(); + Environment.Exit(0); } private async void Updater_NoUpdateAvailible() diff --git a/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.dll b/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.dll index 6c02b4e..79f4dbb 100644 Binary files a/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.dll and b/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.dll differ diff --git a/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.pdb b/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.pdb index dccdce2..4d872e1 100644 Binary files a/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.pdb and b/src/DiscordCLI/bin/Debug/net5.0/DiscordCLI.pdb differ diff --git a/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.dll b/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.dll index 6c02b4e..79f4dbb 100644 Binary files a/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.dll and b/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.dll differ diff --git a/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.pdb b/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.pdb index dccdce2..4d872e1 100644 Binary files a/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.pdb and b/src/DiscordCLI/obj/Debug/net5.0/DiscordCLI.pdb differ