mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-02-05 01:47:51 +00:00
use the existing restart command instead of just dying (._.)
This commit is contained in:
parent
cae0c4f743
commit
3c99a237d2
@ -20,7 +20,7 @@ namespace CompatBot
|
||||
{
|
||||
private static readonly SemaphoreSlim InstanceCheck = new SemaphoreSlim(0, 1);
|
||||
private static readonly SemaphoreSlim ShutdownCheck = new SemaphoreSlim(0, 1);
|
||||
private const ulong InvalidChannelId = 13;
|
||||
internal const ulong InvalidChannelId = 13;
|
||||
|
||||
internal static async Task Main(string[] args)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CompatBot.Commands;
|
||||
using DSharpPlus;
|
||||
|
||||
namespace CompatBot
|
||||
@ -24,7 +25,7 @@ namespace CompatBot
|
||||
{
|
||||
var ch = await client.GetChannelAsync(Config.BotSpamId).ConfigureAwait(false);
|
||||
await client.SendMessageAsync(ch, "Potential socket deadlock detected, restarting...").ConfigureAwait(false);
|
||||
Config.Cts.Cancel(false);
|
||||
Sudo.Bot.Restart(Program.InvalidChannelId);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user