Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot represents the Discord bot.
func StartBot ¶
func StartBot(config *c.DiscordConfig, store *db.Store) *Bot
StartBot starts the Discord bot. It will return a pointer to the Bot for the webserver to use.
func (*Bot) CheckRoles ¶
CheckRoles returns two booleans, first boolean returned is whether they're whitelisted or not. The second boolean returned is whether or not they're an administrator
func (*Bot) PlayerDetails ¶
func (bot *Bot) PlayerDetails(playerID string) c.PlayerDetailsRes
PlayerDetails will resolve the Minecraft player's MCAuth state and Discord roles.
type SyncHandler ¶
type SyncHandler struct {
// contains filtered or unexported fields
}
SyncHandler is for syncing roles of users in memory to prevent Discord API rate limiting.
func (*SyncHandler) GetDiscordIDs ¶
func (sh *SyncHandler) GetDiscordIDs() (userIDs []string)
GetDiscordIDs returns all the ID's stored.
func (*SyncHandler) GetRoles ¶
func (sh *SyncHandler) GetRoles(userID string) (*[]string, bool)
GetRoles returns a member's roles from memory (possibly nil).
func (*SyncHandler) SyncRoles ¶
func (sh *SyncHandler) SyncRoles(userID string, roles *[]string)
SyncRoles stores a given member's roles in memory.
Click to show internal directories.
Click to hide internal directories.