bot

package
v0.260212.2130-preview Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTelegramBot

func RunTelegramBot(ctx context.Context, store *Store, sessionMgr *session.Manager) error

RunTelegramBot starts a Telegram bot that proxies messages to remote-coder sessions.

Types

type Settings

type Settings struct {
	Token         string   `json:"token"`
	Platform      string   `json:"platform"`
	ProxyURL      string   `json:"proxy_url"`
	ChatIDLock    string   `json:"chat_id"`
	BashAllowlist []string `json:"bash_allowlist"`
}

type Store

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

func NewStore

func NewStore(dbPath string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) GetBashCwd

func (s *Store) GetBashCwd(chatID string) (string, bool, error)

func (*Store) GetSessionForChat

func (s *Store) GetSessionForChat(chatID string) (string, bool, error)

func (*Store) GetSettings

func (s *Store) GetSettings() (Settings, error)

func (*Store) SaveSettings

func (s *Store) SaveSettings(settings Settings) error

func (*Store) SetBashCwd

func (s *Store) SetBashCwd(chatID, cwd string) error

func (*Store) SetSessionForChat

func (s *Store) SetSessionForChat(chatID, sessionID string) error

Jump to

Keyboard shortcuts

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