Skip to content

Commit

Permalink
Merge pull request #8 from japsuu/dev
Browse files Browse the repository at this point in the history
Fix crash on Linux systems
  • Loading branch information
japsuu authored Feb 24, 2024
2 parents f2a2735 + 0bf595b commit 3bc6d94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DiscordClient/Graphing/GraphDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ private enum GraphTimePeriod

static GraphDrawer()
{
const string fontPath = @"assets\fonts\runescape_uf.ttf";
const string graphBackgroundPath = @"assets\textures\graph_background.png";
string fontPath = Path.Combine("assets", "fonts", "runescape_uf.ttf");
string graphBackgroundPath = Path.Combine("assets", "textures", "graph_background.png");

string executingAssemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty;
GraphBackgroundPath = Path.Combine(executingAssemblyPath, graphBackgroundPath);
Expand Down
12 changes: 6 additions & 6 deletions DiscordClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal static class Program
private const string HELP_CMD_MESSAGE = @"
Commands:
- help: Shows this message.
- exit: Exits the bot.
- stop: Stops the bot.
";


Expand Down Expand Up @@ -56,8 +56,8 @@ private static async Task Main()
flipperThread.Start();

// Block the program until it is closed.
bool shouldExit = false;
while (!shouldExit)
bool shouldStop = false;
while (!shouldStop)
{
string? input = Console.ReadLine();
if (input == null)
Expand All @@ -67,9 +67,9 @@ private static async Task Main()
case "help":
Logger.Info(HELP_CMD_MESSAGE);
break;
case "exit":
case "stop":
await Shutdown();
shouldExit = true;
shouldStop = true;
break;
default:
Logger.Warn("Unknown command. Type 'help' for a list of commands.");
Expand Down Expand Up @@ -149,7 +149,7 @@ private static async Task OnBotReady()

Logger.Info("");
Logger.Info($"Found {channels.Count} channels to post dump updates on.\n");
Logger.Warn("Please do not close this window manually, but use the 'exit' command to close the bot gracefully.");
Logger.Warn("Please do not close this window manually, but use the 'stop' command to close the bot gracefully.");
Logger.Warn("Type 'help' for a list of commands.");
}

Expand Down

0 comments on commit 3bc6d94

Please sign in to comment.