Minecraft-Console-Client/MinecraftClient/ChatBots/TestBot.cs
BruceChen 1d52d1eadd
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
2022-10-02 18:31:08 +08:00

25 lines
691 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))
{
LogToConsoleTranslated("bot.testBot.told", username, message);
}
else if (IsChatMessage(text, ref message, ref username))
{
LogToConsoleTranslated("bot.testBot.said", username, message);
}
}
}
}