viewer

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMutex

func GetMutex(MutexKey string) *sync.Mutex

func TryChannelAutoRemoval

func TryChannelAutoRemoval(api *apis.API, err error, channel_id types.DiscordChannelID)

Types

type ChannelView

type ChannelView struct {
	Msgs []*discorder.DiscordMessage

	ChannelID types.DiscordChannelID
	// contains filtered or unexported fields
}

func NewChannelView

func NewChannelView(api *apis.API, channelID types.DiscordChannelID) ChannelView

func (ChannelView) DeleteOld

func (v ChannelView) DeleteOld()

func (*ChannelView) Discover

func (v *ChannelView) Discover() error

Query all Discord messages Try to grab already sent message by ID, if yes, assign to found objects with message ID.

func (*ChannelView) RenderViews

func (v *ChannelView) RenderViews()

RenderViews new messages (ensure preserved Message ID)

func (ChannelView) Send

func (v ChannelView) Send()

Edit if message ID is present. Send if not present.

type TaskRefreshChannel

type TaskRefreshChannel struct {
	*worker.Task
	// contains filtered or unexported fields
}

func NewRefreshChannelTask

func NewRefreshChannelTask(
	api *apis.API,
	channelID types.DiscordChannelID,
	delayBetweenChannels types.ViewerDelayBetweenChannels,
) *TaskRefreshChannel

func (*TaskRefreshChannel) RunTask

func (v *TaskRefreshChannel) RunTask(worker_id worker_types.WorkerID) error

type Viewer

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

func NewViewer

func NewViewer(dbpath types.Dbpath, scrappy_storage *scrappy.ScrappyStorage) *Viewer

func (*Viewer) Run

func (v *Viewer) Run()

func (*Viewer) Update

func (v *Viewer) Update()

type ViewerDelays

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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