Skip to content

Commit

Permalink
Fix stupid half a terabyte log file
Browse files Browse the repository at this point in the history
  • Loading branch information
SophiaH67 committed Oct 7, 2024
1 parent ec45e05 commit 695c0c0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/xi-jinping-bot/XiJinpingBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ private async Task HandleMessage(SocketMessage message)

foreach (string messageToSend in messages)
{
await message.Channel.SendMessageAsync(messageToSend);
try
{
await message.Channel.SendMessageAsync(messageToSend);
}
catch
{
// I would log something, but last time it logged anything (the exception)
// it filled up my 512GiB disk entirely with error logs. I do not want this
// to happen again, so I'm just going to ignore it. 🚀
}
}
}

Expand Down

0 comments on commit 695c0c0

Please sign in to comment.