db

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package db provides a wrapper around database backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpEnabled added in v1.9.3

func ExpEnabled(gid string) (enabled bool, err error)

ExpEnabled queries whether the experience system is enabled for a guild.

func GetLastfm added in v1.9.3

func GetLastfm(user *discordgo.User, guild *discordgo.Guild) (string, error)

GetLastfm gets a user's lastfm username.

func GetMemberExp added in v1.9.3

func GetMemberExp(user *discordgo.User, guild *discordgo.Guild) (int, error)

GetMemberExp obtains experience amount of a guild member.

func GetRankBind added in v1.9.3

func GetRankBind(guild *discordgo.Guild, level int) (string, error)

GetRankBind gets binding of a role to a level.

func GetRankBinds added in v1.9.3

func GetRankBinds(guild *discordgo.Guild) (map[string]string, error)

GetRankBinds gets binding of a role to a level.

func HighlightBindMessage added in v1.9.3

func HighlightBindMessage(gid, message, highlight string) error

HighlightBindMessage binds a message with the highlight message.

func HighlightGetBinding added in v1.9.3

func HighlightGetBinding(gid, message string) (string, error)

HighlightGetBinding gets the binding of a message.

func HighlightUnbindMessage added in v1.9.3

func HighlightUnbindMessage(gid, message string) error

HighlightUnbindMessage unbinds a message with the highlight message.

func Initialize

func Initialize() error

Initialize prepares database.

func ResetLastfm added in v1.9.3

func ResetLastfm(user *discordgo.User, guild *discordgo.Guild) error

ResetLastfm resets a user's lastfm username.

func SetLastfm added in v1.9.3

func SetLastfm(user *discordgo.User, guild *discordgo.Guild, username string) error

SetLastfm sets a user's lastfm username.

func SetMemberExp added in v1.9.3

func SetMemberExp(user *discordgo.User, guild *discordgo.Guild, exp int) error

SetMemberExp sets a member's experience amount.

func SetRankBind added in v1.9.3

func SetRankBind(guild *discordgo.Guild, level int, role *discordgo.Role) error

SetRankBind binds a role to a level.

func UnsetRankBind added in v1.9.3

func UnsetRankBind(guild *discordgo.Guild, level string) error

UnsetRankBind unbinds a role from a level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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