Minecraft-Console-Client/MinecraftClient/ChatBots/TestBot.cs
BruceChen 077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00

25 lines
723 B
C#

namespace MinecraftClient.ChatBots
{
/// <summary>
/// Example of message receiving.
/// </summary>
public class TestBot : ChatBot
{
public override void GetText(string text)
{
string message = "";
string username = "";
text = GetVerbatim(text);
if (IsPrivateMessage(text, ref message, ref username))
{
LogToConsole(string.Format(Translations.bot_testBot_told, username, message));
}
else if (IsChatMessage(text, ref message, ref username))
{
LogToConsole(string.Format(Translations.bot_testBot_said, username, message));
}
}
}
}