hi
i am learning to make a chatbot with mcc.
i found ChatBotCommand in chatbot.cs ,but i dont know how to use it.
Please tell me how to use this class,or other way to register a command,thanks a lot.
My attempt is as follows
using MinecraftClient.Scripting;
namespace MinecraftClient.ChatBots;
public class MyBot : ChatBot
{
public override void Initialize()
{
base.Initialize();
new ChatBotCommand("test", "print a test message", "", new CommandRunner(RunTest));//or maybe i need pass this object into a registration method?
LogToConsole("Bot Loaded"); // this message can be printed
}
public string RunTest(string command, string[] args)
{
LogToConsole("it work!");
return "end";
}
}
hi i am learning to make a chatbot with mcc. i found ChatBotCommand in chatbot.cs ,but i dont know how to use it. Please tell me how to use this class,or other way to register a command,thanks a lot.
My attempt is as follows
and it dosent work ;(