mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Restricted usage of quit/exit commands in the TelegramBridge chat bot due to Telegram caching causing problems
This commit is contained in:
parent
4f608687ee
commit
91791e99c7
1 changed files with 11 additions and 0 deletions
|
|
@ -345,6 +345,17 @@ namespace MinecraftClient.ChatBots
|
|||
{
|
||||
var command = text[1..];
|
||||
|
||||
if (command.ToLower().Contains("quit") || command.ToLower().Contains("exit"))
|
||||
{
|
||||
await botClient.SendTextMessageAsync(
|
||||
chatId: chatId,
|
||||
replyToMessageId: message.MessageId,
|
||||
text: "This command has been disabled due to Telegram caching causing issues, please stop your client manually.",
|
||||
cancellationToken: _cancellationToken,
|
||||
parseMode: ParseMode.Markdown);
|
||||
return;;
|
||||
}
|
||||
|
||||
CmdResult result = new();
|
||||
PerformInternalCommand(command, ref result);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue