Plugins can also add custom commands to the botting tab. Regular plugin api functions can be used within the Activate method. This page describes how to make a plugin that registers new commands.
PluginCore.cs
[Plugin(1,"Extra Botting Command Plugin","Adds new command to the botting tab!")]publicclassPluginCore:IStartPlugin{ /// <summary> /// Should be used to check compatability with the /// current version of the bot. /// </summary>publicoverridevoidOnLoad(int version,int subversion,int buildversion) { }publicoverridePluginResponseOnEnable(IBotSettings botSettings) {/* Regular plugin content */return base.OnEnable(botSettings); }}publicclassTestCommand:IExternalCommand {publicoverridestring Name =>"Test Command 1";publicoverridestring Description =>"This is a description for the command.";publicTestCommand() {this.Variables=newICommandVariableCollection( new ExternalCommandVariable(typeof(string), "internal_variable_name", "Text to print", "What message should we send to the chat?", "This is a default message")
); }publicoverrideCommandResponseActivate(IBotContext Context,ICommandVariables arguments,IStopToken token) {Context.Functions.Chat("Hello, my message is: "+arguments.Get<string>("internal_variable_name"));returnnewCommandResponse(); // no parameters means success=true }}