levels

package
v0.0.0-...-0abf00b Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 44 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeInt64

func HumanizeInt64(i int64) string

func Init

func Init(bot *bot.Bot) (s string, list []*bcr.Command)

Init ...

Types

type Bot

type Bot struct {
	*bot.Bot
}

Bot ...

type LevelMessages

type LevelMessages string

LevelMessages ...

const (
	AllDM          LevelMessages = "ALL_DM"
	RewardsDM      LevelMessages = "REWARDS_DM"
	AllChannel     LevelMessages = "ALL_CHANNEL"
	RewardsChannel LevelMessages = "REWARDS_CHANNEL"
	NoMessages     LevelMessages = "NONE"
)

...

type Levels

type Levels struct {
	ServerID discord.GuildID
	UserID   discord.UserID

	XP int64

	Colour     discord.Color
	Background string

	NextTime time.Time
}

Levels ...

type Nolevels

type Nolevels struct {
	ServerID discord.GuildID
	UserID   discord.UserID
	Expires  bool
	Expiry   time.Time

	LogChannel discord.ChannelID
}

Nolevels ...

type Reward

type Reward struct {
	ServerID   discord.GuildID
	Lvl        int64
	RoleReward discord.RoleID
}

Reward ...

type Server

type Server struct {
	ID discord.GuildID

	BlockedChannels   []uint64
	BlockedRoles      []uint64
	BlockedCategories []uint64

	RewardLog   discord.ChannelID
	NolevelsLog discord.ChannelID

	BetweenXP  time.Duration
	RewardText string
	Background string

	LevelsEnabled      bool
	LeaderboardModOnly bool
	ShowNextReward     bool
	Voice              bool

	LevelMessages LevelMessages
	LevelChannel  discord.ChannelID
}

Server ...

func (Server) CalculateExp

func (sc Server) CalculateExp(level int64) (xp int64)

func (Server) CalculateLevel

func (sc Server) CalculateLevel(xp int64) (lvl int64)

Jump to

Keyboard shortcuts

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