Minecraft-Console-Client/MinecraftClient/ChatBots/TestBot.cs
ORelio 79aaa04775 ScriptScheduler: Add debug messages for issue #431
These messages will only apprear if debugmessages=true in config.
2018-05-08 19:27:19 +02:00

30 lines
769 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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("Bot: " + username + " told me : " + message);
}
else if (IsChatMessage(text, ref message, ref username))
{
LogToConsole("Bot: " + username + " said : " + message);
}
}
}
}