mirror of
https://github.com/Stone-Red-Code/DiscordCLI.git
synced 2026-09-04 09:05:59 +02:00
Multiple bug fixes
Fixed: URL detection regex Application crashes when a message is sent in the read-only channel Application does not exit correctly
This commit is contained in:
Binary file not shown.
@@ -179,7 +179,7 @@ namespace DiscordCLI
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
ConsoleExt.WriteLine(ex, ConsoleColor.Red);
|
ConsoleExt.WriteLine(ex.Message, ConsoleColor.Red);
|
||||||
GlobalInformation.currentTextChannel = null;
|
GlobalInformation.currentTextChannel = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,9 +76,18 @@ namespace DiscordCLI
|
|||||||
else if (GlobalInformation.currentTextChannel != null)
|
else if (GlobalInformation.currentTextChannel != null)
|
||||||
{
|
{
|
||||||
cooldown++;
|
cooldown++;
|
||||||
Console.Write("\r" + new string(' ', Console.WindowWidth));
|
|
||||||
await GlobalInformation.currentTextChannel.SendMessageAsync(rawInput);
|
try
|
||||||
return (false, false);
|
{
|
||||||
|
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();
|
Console.WriteLine();
|
||||||
|
|||||||
@@ -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<C{(int)ConsoleColor.Blue}C>{match.Value}\0");
|
message = message.Replace(match.Value, $"\0<C{(int)ConsoleColor.Blue}C>{match.Value}\0");
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,6 @@ namespace DiscordCLI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
consoleColor = ClosestConsoleColor(color);
|
consoleColor = ClosestConsoleColor(color);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (consoleColor == Console.BackgroundColor || consoleColor == ConsoleColor.DarkGray)
|
if (consoleColor == Console.BackgroundColor || consoleColor == ConsoleColor.DarkGray)
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ namespace DiscordCLI
|
|||||||
outputManager.InputManager = inputManager;
|
outputManager.InputManager = inputManager;
|
||||||
|
|
||||||
await inputManager.ReadInput();
|
await inputManager.ReadInput();
|
||||||
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Updater_NoUpdateAvailible()
|
private async void Updater_NoUpdateAvailible()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user