level

package
v0.0.0-...-ae6a1b9 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorOptions

type ColorOptions struct {
	R     int
	G     int
	B     int
	Alpha int
}

type ExpBarOptions

type ExpBarOptions struct {
	X                              float64
	Y                              float64
	Width                          float64
	Height                         float64
	Radius                         float64
	StrokeSize                     int
	CurrentExperience              uint64
	CurrentLevelRequiredExperience uint64
	RequiredExperience             uint64
	ShadowOptions                  ColorOptions
	EmptyBarOptions                ColorOptions
	FilledBarOptions               ColorOptions
}

type ExpType

type ExpType int
const (
	ExpTypeText ExpType = 1 + iota
	ExpTypeVoice

	RoleEmojiLength = 5
)

func (ExpType) String

func (e ExpType) String() string

type Manager

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

func NewManager

func NewManager(session *discordgo.Session, discordRepository repository.DiscordRepository, ignoredTextChannels []string, ignoredVoiceChannels []string) *Manager

func (*Manager) OnMemberUpdate

func (m *Manager) OnMemberUpdate(member *discordgo.Member)

func (*Manager) OnMessage

func (m *Manager) OnMessage(messageCreate *discordgo.MessageCreate)

func (*Manager) OnRankQuery

func (m *Manager) OnRankQuery(user *discordgo.User)

func (*Manager) OnReload

func (m *Manager) OnReload(reload ReloadMessage)

func (*Manager) OnVoiceUpdate

func (m *Manager) OnVoiceUpdate(update *discordgo.VoiceStateUpdate)

func (*Manager) Start

func (m *Manager) Start()

func (*Manager) Stop

func (m *Manager) Stop()

type MemberLevelStatus

type MemberLevelStatus struct {
	CurrentLevel models.DiscordLevel
	NextLevel    models.DiscordLevel
	models.DiscordMemberLevel
	EpisodeExperience models.DiscordEpisodeExperience
	Member            *discordgo.Member
	Position          int
}

type RankImageOptions

type RankImageOptions struct {
	BackgroundImagePath string
	FontFace            string

	Width        int
	Height       int
	AvatarWidth  int
	AvatarHeight int
	AvatarArcX   float64
	AvatarArcY   float64
	AvatarRadius float64
	AvatarX      int
	AvatarY      int

	RankTextOptions     ShadowedTextOptions
	UsernameTextOptions ShadowedTextOptions
	RoleTextOptions     ShadowedTextOptions
	LevelTextOptions    ShadowedTextOptions
	ExpBarOptions
	CurrentExpOptions   ShadowedTextOptions
	CurrentLevelOptions ShadowedTextOptions
	NextLevelOptions    ShadowedTextOptions

	Avatar image.Image
}

type ReloadMessage

type ReloadMessage struct {
	ReloadMemberLevels               bool
	ReloadDiscordMemberLevelMessages bool
	ReloadLevels                     bool
}

type ShadowedTextOptions

type ShadowedTextOptions struct {
	Text          string
	StrokeSize    int
	X             float64
	Y             float64
	Ax            float64
	Ay            float64
	ShadowOptions ColorOptions
	TextOptions   ColorOptions
}

type SortedMemberLevelStatuses

type SortedMemberLevelStatuses []*MemberLevelStatus

func (SortedMemberLevelStatuses) Len

func (SortedMemberLevelStatuses) Less

func (s SortedMemberLevelStatuses) Less(i, j int) bool

func (SortedMemberLevelStatuses) Swap

func (s SortedMemberLevelStatuses) Swap(i, j int)

Jump to

Keyboard shortcuts

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