bot

package
v0.0.0-...-156197f Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

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
}

func NewBot

func NewBot(
	logger *slog.Logger,
	session *discordgo.Session,
	guildID string,
	searcher search.Searcher,
	srtStore *store.SRTStore,
	mediaPath string,
) *Bot

func (*Bot) Close

func (b *Bot) Close() error

func (*Bot) Start

func (b *Bot) Start() error

type ContentModifier

type ContentModifier uint8
const (
	ContentModifierNone ContentModifier = iota
	ContentModifierDisableText
)

type CustomID

type CustomID struct {
	MediaID         string          `json:"e,omitempty"`
	StartLine       int32           `json:"s,omitempty"`
	EndLine         int32           `json:"f,omitempty"`
	NumContextLines int             `json:"c,omitempty"`
	MediaType       MediaType       `json:"m,omitempty"`
	ContentModifier ContentModifier `json:"t,omitempty"`
}

func (CustomID) Publication

func (c CustomID) Publication() string

func (CustomID) String

func (c CustomID) String() string

type MediaType

type MediaType uint8
const (
	MediaTypeNone MediaType = iota
	MediaTypeWebm
	MediaTypeMp3
)

Jump to

Keyboard shortcuts

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