bot

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package bot implements the sondra control bot: it lets allow-listed users drive scans, monitors, and diffs from Telegram (text commands) and Discord (slash commands), streaming results back through the notification system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	// contains filtered or unexported fields
}

Bot dispatches chat commands to the recon pipeline across transports.

func New

func New(cfg *config.Config, cfgFile, version string) *Bot

New builds a Bot. cfgFile is reloaded per job so each scan gets a fresh timestamped output directory.

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

Run starts the configured transports and blocks until ctx is cancelled.

type Command

type Command struct {
	Name     string // scan | monitor | diff | status | list | stop | report | help
	Domain   string
	Preset   string
	Modules  []string
	Exclude  []string
	Interval time.Duration
	OnMode   string
	Arg      string // positional argument for stop/report (a job id)
}

Command is a parsed chat command with full scan/monitor flag parity.

type Job

type Job struct {
	ID        int
	Kind      string // "scan" or "monitor"
	Domain    string
	Preset    string
	StartedAt time.Time
	// contains filtered or unexported fields
}

Job is a running scan or monitor started from chat.

Jump to

Keyboard shortcuts

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