bugfix: Fixed Telegram Bridge not displaying player names properly for players with an underscore in their nick names

Update TelegramBridge.cs
This commit is contained in:
Anon 2026-06-07 14:11:54 +02:00 committed by GitHub
commit 61c2cbf7c3
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())