bot

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxMessagesPerNotify = 10

MaxMessagesPerNotify is the maximum number of messages to send in a single notify. This number was based on the discord maximum of 10 embeds per message.

Variables

This section is empty.

Functions

func LogWith

func LogWith(v any, more ...any) *slog.Logger

Types

type Bot

type Bot struct {
	DB      db.DB
	Sendico *sendico.Client
	// contains filtered or unexported fields
}

func New

func New(token string, db db.DB, sendico *sendico.Client) (*Bot, error)

func (*Bot) Close

func (b *Bot) Close() error

func (*Bot) NotifyNewItems

func (b *Bot) NotifyNewItems(termEN, userID string, items []sendico.Item) error

func (*Bot) Register

func (b *Bot) Register(guild string) error

func (*Bot) Start

func (b *Bot) Start() (err error)

func (*Bot) Unregister

func (b *Bot) Unregister(guild string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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