mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Update TelegramBridge.cs
The names of players containing the "_" symbol were not read.
This commit is contained in:
parent
80c07634e2
commit
2e383403c3
1 changed files with 17 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
else message = text;
|
||||
|
||||
SendMessage(message);
|
||||
SendRawMessage(message);
|
||||
}
|
||||
|
||||
public void SendMessage(string message)
|
||||
|
|
@ -213,6 +213,22 @@ namespace MinecraftClient.ChatBots
|
|||
}
|
||||
}
|
||||
|
||||
public void SendRawMessage(string message)
|
||||
{
|
||||
if (!CanSendMessages() || string.IsNullOrEmpty(message))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
botClient!.SendMessage(Config.ChannelId.Trim(), message).Wait(Config.Message_Send_Timeout);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogToConsole("§§4§l§f" + Translations.bot_TelegramBridge_canceled_sending);
|
||||
LogDebugToConsole(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void SendImage(string filePath, string? text = null)
|
||||
{
|
||||
if (!CanSendMessages())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue