When a user speaks in a channel or sends a private message, Darkbot processes the text through a pipeline:
If a plugin fetches data from an external web server, execute that request asynchronously or in a separate thread. Synchronous web requests will freeze the entire bot until the server responds, causing it to disconnect from the chat network.
Many administrators compile Darkbot with an embedded scripting interpreter. This allows the bot to execute external scripts dynamically when specific trigger words or channel events occur. darkbot plugins
Queries financial APIs to return instant price updates for stocks, Bitcoin, Ethereum, and other digital assets.
If you cannot find a pre-made plugin that fits your needs, writing one is straightforward if your bot supports external script execution. Below is a conceptual example of how an external script-based plugin interacts with Darkbot to return a server's uptime. When a user speaks in a channel or
To build a well-rounded server assistant, you should categorize and deploy your plugins based on utility. 1. Automated Moderation Tools
!rules <=> Please respect others, do not spam, and keep topics relevant. Use code with caution. Step 3: Reload the Bot This allows the bot to execute external scripts
# Automatic Plugin Loader for filename in os.listdir('./plugins'): if filename.endswith('.py'): bot.load_extension(f'plugins.filename[:-3]') print(f"Loaded plugin: filename")
For example, a simple rule plugin to display rules looks like this:
Your plugin must include the primary header files and implement the standard function signature that Darkbot expects when passing channel text.