Openbullet 2 Plugins

Once the code is complete, build the project. The output will be a .dll file, typically found in the bin/Debug/net8.0/ folder. This .dll is your compiled plugin.

OpenBullet 2 (OB2) uses a hot-loadable plugin system that allows developers to extend the software's functionality without modifying the core source code. These plugins primarily add custom blocks

Plugins generally fall into several categories. Understanding these categories will help you choose the right one for your project. Openbullet 2 Plugins

Through the BotData data parameter, your plugin can:

Plugins can be added or removed while the application is running. User-Defined Blocks Once the code is complete, build the project

private readonly ILogger _logger;

Always wrap potentially failing operations inside try‑catch blocks and log meaningful error messages. Use data.Logger.LogError() to indicate failures. If a block cannot continue, you can set data.BotStatus = BotStatus.Error . OpenBullet 2 (OB2) uses a hot-loadable plugin system

[BlockCategory("Calculator", "Blocks that allow to perform operations on numbers", "#9acd32")] public static class Methods

These change the request before it is sent:

Delete the default Class1.cs file and create a new class file, for example, Methods.cs . The following code provides a complete example of a simple custom block that adds two integer numbers together: