Update TelegramBridge.cs

The names of players containing the "_" symbol were not read.
This commit is contained in:
werfrag 2026-06-07 01:36:38 +02:00 committed by GitHub
parent 80c07634e2
commit 2e383403c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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())