commandbot

command
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command bot that demonstrates a multi-command handler pattern.

Supported commands:

!help       - Show available commands
!ping       - Respond with "pong" (latency check)
!time       - Show current server time
!ai <prompt> - Generate AI response using Ollama (if configured)
!code <prompt> - Generate code and extract code blocks

Set environment variables before running:

export MATRIX_API_URL="https://matrix.example.com"
export MATRIX_API_USER="botuser"
export MATRIX_API_PASS="botpassword"
export OPEN_WEB_API_GENERATE_URL="http://localhost:11434/api/generate"  # optional
export OPEN_WEB_API_TOKEN="your-ollama-token"                           # optional
go run ./examples/commandbot/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL