Documentation ¶
Index ¶
Constants ¶
View Source
const AutoRankFile string = "data/autoRanks.json"
AutoRankFile is the default file for loading and saving auto promote ranks
View Source
const XpFile string = "data/xp.json"
XpFile is the path where the xp data is saved.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AkSession ¶
type AkSession interface { GuildMember(guildID string, userID string) (st *dg.Member, err error) GuildMembers(guildID string, after string, limit int) (st []*dg.Member, err error) GuildRoles(guildID string) (st []*dg.Role, err error) GuildMemberRoleAdd(guildID string, userID string, roleID string) (err error) }
AkSession allows for tests to mock discordgo session method calls
type MsgEmbed ¶ added in v0.9.0
type MsgEmbed *dg.MessageEmbed
MsgEmbed is used to shorten the name of the original embed type from discordGo
type System ¶
type System struct { Data *Data // contains filtered or unexported fields }
System holds all data needed to execute the functionality.
func NewXpStore ¶
NewXpStore creates the experience data storage map for the session
func (*System) AutoSaveXP ¶
func (x *System) AutoSaveXP()
AutoSaveXP is launched by main.go before accepting new messages. Default time is coded to 5 minutes.
func (*System) ManipulateXP ¶
func (x *System) ManipulateXP(action string, msg *dg.MessageCreate)
ManipulateXP is used by any part of the program that needs to read or write data after startup.
Click to show internal directories.
Click to hide internal directories.