mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Telegram, limit the quit/exit command
Telegram, limit the quit/exit command
This commit is contained in:
commit
2f1da9e8c9
3 changed files with 128 additions and 2040 deletions
|
|
@ -345,6 +345,17 @@ namespace MinecraftClient.ChatBots
|
||||||
{
|
{
|
||||||
var command = text[1..];
|
var command = text[1..];
|
||||||
|
|
||||||
|
if (command.ToLower().Contains("quit") || command.ToLower().Contains("exit"))
|
||||||
|
{
|
||||||
|
await botClient.SendTextMessageAsync(
|
||||||
|
chatId: chatId,
|
||||||
|
replyToMessageId: message.MessageId,
|
||||||
|
text: $"{Translations.bot_TelegramBridge_quit_disabled}",
|
||||||
|
cancellationToken: _cancellationToken,
|
||||||
|
parseMode: ParseMode.Markdown);
|
||||||
|
return;;
|
||||||
|
}
|
||||||
|
|
||||||
CmdResult result = new();
|
CmdResult result = new();
|
||||||
PerformInternalCommand(command, ref result);
|
PerformInternalCommand(command, ref result);
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -2034,4 +2034,7 @@ Logging in...</value>
|
||||||
<data name="cmd.dig.cancel" xml:space="preserve">
|
<data name="cmd.dig.cancel" xml:space="preserve">
|
||||||
<value>Cancel mining the block located at {0}.</value>
|
<value>Cancel mining the block located at {0}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="bot.TelegramBridge.quit_disabled" xml:space="preserve">
|
||||||
|
<value>This command has been disabled due to Telegram caching causing issues, please stop your client manually.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue