discord

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 14 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(
	token string,
	groupSvc GroupService,
	choiceSvc ChoiceService,
	villageSvc VillageService,
	logger *zap.Logger,
) (*Bot, error)

func (*Bot) Close

func (b *Bot) Close() error

func (*Bot) Run

func (b *Bot) Run() error

type ChoiceService

type ChoiceService interface {
	Versions(ctx context.Context) ([]domain.Choice, error)
}

type GroupService

type GroupService interface {
	Create(ctx context.Context, params domain.CreateGroupParams) (domain.GroupWithMonitors, error)
	AddTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)
	RemoveTribe(ctx context.Context, id, serverID, tribeTag string) (domain.GroupWithMonitors, error)
	SetLanguageTag(ctx context.Context, id, serverID, languageTag string) (domain.GroupWithMonitors, error)
	SetChannelGains(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)
	SetChannelLosses(ctx context.Context, id, serverID, channel string) (domain.GroupWithMonitors, error)
	SetInternals(ctx context.Context, id, serverID string, internals bool) (domain.GroupWithMonitors, error)
	SetBarbarians(ctx context.Context, id, serverID string, barbarians bool) (domain.GroupWithMonitors, error)
	Execute(ctx context.Context) ([]domain.EnnoblementNotification, error)
	CleanUp(ctx context.Context) error
	ListServer(ctx context.Context, serverID string) ([]domain.GroupWithMonitors, error)
	GetWithTribes(ctx context.Context, id, serverID string) (domain.GroupWithMonitorsAndTribes, error)
	Delete(ctx context.Context, id, serverID string) error
}

type VillageService added in v0.4.1

type VillageService interface {
	TranslateCoords(
		ctx context.Context,
		params domain.TranslateVillageCoordsParams,
		page int32,
	) (domain.TranslateVillageCoordsResult, error)
	TranslateCoordsFromHash(ctx context.Context, paramsSHA256Hash string, page int32) (domain.TranslateVillageCoordsResult, error)
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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