Documentation ¶
Index ¶
- Constants
- Variables
- func GetExpForLevel(level int) int64
- func GetLevelFromExp(exp int64) int
- func GetProgressToNextLevelFromExp(exp int64) int
- type Cache_Levels_top
- type Levels
- func (m *Levels) Action(command string, content string, msg *discordgo.Message, ...)
- func (l *Levels) BadgePickerActiveText(username string, activeBadgeIDs []string, ...) string
- func (l *Levels) BadgePickerHelpText() string
- func (l *Levels) BadgePickerPrintBadges(user *discordgo.User, channeID string, ...) []string
- func (l *Levels) BadgePickerPrintCategories(user *discordgo.User, channeID string, ...) []string
- func (b *Levels) BucketDrain(amount int8, user string) error
- func (b *Levels) BucketGet(user string) int8
- func (b *Levels) BucketHasKeys(user string) bool
- func (b *Levels) BucketInit()
- func (b *Levels) BucketRefiller()
- func (b *Levels) BucketSet(user string, value int8)
- func (m *Levels) Commands() []string
- func (b *Levels) CreateBucketIfNotExists(user string)
- func (l *Levels) DeleteMessages(channelID string, messages []string)
- func (m *Levels) GetAccentColor(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetAvatarOpacity(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetBackgroundColor(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetBackgroundOpacity(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetBadgeOpacity(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetDetailOpacity(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetExpOpacity(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) GetProfile(member *discordgo.Member, guild *discordgo.Guild, gifP bool) ([]byte, string, error)
- func (l *Levels) GetProfileBackgroundUrl(userdata models.ProfileUserdataEntry) (link string)
- func (l *Levels) GetProfileBackgroundUrlByName(backgroundName string) string
- func (m *Levels) GetProfileHTML(member *discordgo.Member, guild *discordgo.Guild, web bool) (string, error)
- func (m *Levels) GetTextColor(userUserdata models.ProfileUserdataEntry) string
- func (m *Levels) Init(session *shardmanager.Manager)
- func (b *Levels) OnGuildBanAdd(user *discordgo.GuildBanAdd, session *discordgo.Session)
- func (b *Levels) OnGuildBanRemove(user *discordgo.GuildBanRemove, session *discordgo.Session)
- func (m *Levels) OnGuildMemberAdd(member *discordgo.Member, session *discordgo.Session)
- func (m *Levels) OnGuildMemberRemove(member *discordgo.Member, session *discordgo.Session)
- func (m *Levels) OnMessage(content string, msg *discordgo.Message, session *discordgo.Session)
- func (b *Levels) OnMessageDelete(msg *discordgo.MessageDelete, session *discordgo.Session)
- func (b *Levels) OnReactionAdd(reaction *discordgo.MessageReactionAdd, session *discordgo.Session)
- func (b *Levels) OnReactionRemove(reaction *discordgo.MessageReactionRemove, session *discordgo.Session)
- func (m *Levels) ProcessMessage(msg *discordgo.Message, session *discordgo.Session)
- func (l *Levels) ProfileBackgroundSearch(searchText string) (entryBucket []models.ProfileBackgroundEntry)
- func (l *Levels) Uninit(session *shardmanager.Manager)
- type Levels_Cache_Ranking_Item
- type Pair
- type PairList
- type ProcessExpInfo
Constants ¶
View Source
const ( BadgeLimt = 18 TimeAtUserFormat = "Mon, 15:04" TimeBirthdayFormat = "01/02" )
Variables ¶
View Source
var ( LevelsBucket = &ratelimits.BucketContainer{} // How many keys a bucket may contain when created BUCKET_INITIAL_FILL int8 = 1 // The maximum amount of keys a user may possess BUCKET_UPPER_BOUND int8 = 1 // How often new keys drip into the buckets DROP_INTERVAL = 60 * time.Second // How many keys may drop at a time DROP_SIZE int8 = 1 )
Functions ¶
func GetExpForLevel ¶
func GetLevelFromExp ¶
Types ¶
type Cache_Levels_top ¶
type Levels ¶
func (*Levels) BadgePickerActiveText ¶
func (*Levels) BadgePickerHelpText ¶
func (*Levels) BadgePickerPrintBadges ¶
func (*Levels) BadgePickerPrintCategories ¶
func (l *Levels) BadgePickerPrintCategories(user *discordgo.User, channeID string, availableBadges []models.ProfileBadgeEntry, activeBadgeIDs []string, allBadges []models.ProfileBadgeEntry) []string
func (*Levels) BucketDrain ¶
Drains $amount from $user if he has enough keys left
func (*Levels) BucketHasKeys ¶
Check if the user still has keys
func (*Levels) BucketInit ¶
func (b *Levels) BucketInit()
func (*Levels) BucketRefiller ¶
func (b *Levels) BucketRefiller()
Refills user buckets in a set interval
func (*Levels) CreateBucketIfNotExists ¶
Check if the user has a bucket. If not create one
func (*Levels) DeleteMessages ¶
func (*Levels) GetAccentColor ¶
func (m *Levels) GetAccentColor(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetAvatarOpacity ¶
func (m *Levels) GetAvatarOpacity(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetBackgroundColor ¶
func (m *Levels) GetBackgroundColor(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetBackgroundOpacity ¶
func (m *Levels) GetBackgroundOpacity(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetBadgeOpacity ¶
func (m *Levels) GetBadgeOpacity(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetDetailOpacity ¶
func (m *Levels) GetDetailOpacity(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetExpOpacity ¶
func (m *Levels) GetExpOpacity(userUserdata models.ProfileUserdataEntry) string
func (*Levels) GetProfile ¶
func (*Levels) GetProfileBackgroundUrl ¶
func (l *Levels) GetProfileBackgroundUrl(userdata models.ProfileUserdataEntry) (link string)
func (*Levels) GetProfileBackgroundUrlByName ¶
func (*Levels) GetProfileHTML ¶
func (*Levels) GetTextColor ¶
func (m *Levels) GetTextColor(userUserdata models.ProfileUserdataEntry) string
func (*Levels) Init ¶
func (m *Levels) Init(session *shardmanager.Manager)
func (*Levels) OnGuildBanAdd ¶
func (b *Levels) OnGuildBanAdd(user *discordgo.GuildBanAdd, session *discordgo.Session)
func (*Levels) OnGuildBanRemove ¶
func (b *Levels) OnGuildBanRemove(user *discordgo.GuildBanRemove, session *discordgo.Session)
func (*Levels) OnGuildMemberAdd ¶
func (*Levels) OnGuildMemberRemove ¶
func (*Levels) OnMessageDelete ¶
func (b *Levels) OnMessageDelete(msg *discordgo.MessageDelete, session *discordgo.Session)
func (*Levels) OnReactionAdd ¶
func (b *Levels) OnReactionAdd(reaction *discordgo.MessageReactionAdd, session *discordgo.Session)
func (*Levels) OnReactionRemove ¶
func (b *Levels) OnReactionRemove(reaction *discordgo.MessageReactionRemove, session *discordgo.Session)
func (*Levels) ProcessMessage ¶
func (*Levels) ProfileBackgroundSearch ¶
func (l *Levels) ProfileBackgroundSearch(searchText string) (entryBucket []models.ProfileBackgroundEntry)
func (*Levels) Uninit ¶
func (l *Levels) Uninit(session *shardmanager.Manager)
type ProcessExpInfo ¶
Click to show internal directories.
Click to hide internal directories.