bot

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"bot",
	fx.Decorate(func(logger *zap.Logger) *zap.Logger {
		return logger.Named("bot")
	}),
	fx.Provide(newApi, fx.Private),
	fx.Provide(new),
	fx.Invoke(func(lc fx.Lifecycle, bot *bot, log *zap.Logger) {
		lc.Append(fx.Hook{
			OnStart: func(ctx context.Context) error {
				bot.Start()
				log.Info("bot started")
				return nil
			},
			OnStop: func(ctx context.Context) error {
				bot.Stop()
				log.Info("bot stopped")
				return nil
			},
		})
	}),
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳