mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fixed Map Chat Bot not sending maps in case the Discord Bridge was not ready and connected.
This commit is contained in:
parent
8071cd1b78
commit
cbfc592e27
2 changed files with 44 additions and 18 deletions
|
|
@ -14,6 +14,7 @@ namespace MinecraftClient.ChatBots
|
|||
public class DiscordBridge : ChatBot
|
||||
{
|
||||
private static DiscordBridge? instance = null;
|
||||
public bool IsConnected { get; private set; }
|
||||
|
||||
private DiscordClient? _client;
|
||||
private DiscordChannel? _channel;
|
||||
|
|
@ -80,6 +81,7 @@ namespace MinecraftClient.ChatBots
|
|||
}).Wait();
|
||||
|
||||
_client.DisconnectAsync().Wait();
|
||||
IsConnected = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -280,6 +282,7 @@ namespace MinecraftClient.ChatBots
|
|||
Color = new DiscordColor(0x00FF00)
|
||||
});
|
||||
|
||||
IsConnected = true;
|
||||
await Task.Delay(-1);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue