discord

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BotModule = fx.Module("discord_bot",
	fx.Provide(
		NewBot,
	),
	fx.Decorate(wrapLogger),
)

Functions

This section is empty.

Types

type Bot

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

func NewBot

func NewBot(p BotParams) (*Bot, error)

func (*Bot) Sync added in v0.8.4

func (b *Bot) Sync() error

type BotParams

type BotParams struct {
	fx.In

	LC fx.Lifecycle

	Logger   *zap.Logger
	TP       *tracesdk.TracerProvider
	DB       *sql.DB
	Enricher *mstlystcdata.Enricher
	Config   *config.Config
}

type Guild

type Guild struct {
	Job string `alias:"job"`
	ID  string `alias:"id"`
	// contains filtered or unexported fields
}

func NewGuild added in v0.8.4

func NewGuild(b *Bot, guild *discordgo.Guild, job string) (*Guild, error)

func (*Guild) Run added in v0.8.4

func (g *Guild) Run() error

func (*Guild) Stop added in v0.8.5

func (g *Guild) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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