inatobs

package
v0.0.0-...-4e30d13 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigCommandOptions

func ConfigCommandOptions() mod.ConfigCommandOptions

func Provider

func Provider(db *store.Queries, logger *slog.Logger) (mod.ModuleProviderResult, error)

Types

type ChannelConfig

type ChannelConfig struct {
	ID          string `json:"id"`
	CronPattern string `json:"cron_pattern"`
	ProjectID   int64  `json:"inat_project_id"`
	PageSize    int    `json:"page_size"`
}

type Module

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

func New

func New(db *store.Queries, logger *slog.Logger) (*Module, error)

func (*Module) Config

func (m *Module) Config() []ChannelConfig

func (*Module) DisplayedObservers

func (m *Module) DisplayedObservers(channelID string) ([]int64, bool)

func (*Module) Name

func (m *Module) Name() string

func (*Module) Post

func (m *Module) Post(discord *discordgo.Session, channelID string)

func (*Module) ReloadConfig

func (m *Module) ReloadConfig(
	ctx context.Context,
	discord *discordgo.Session,
	db *store.Queries,
) error

func (*Module) SetConfig

func (m *Module) SetConfig(config []ChannelConfig)

func (*Module) SetDisplayedObservers

func (m *Module) SetDisplayedObservers(channelID string, do []int64)

func (*Module) Start

func (m *Module) Start(ctx context.Context, discord *discordgo.Session, db *store.Queries) error

Jump to

Keyboard shortcuts

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