Documentation ¶
Index ¶
- Constants
- Variables
- func InitLang(localePath, lang string)
- func LoadTranslations(localePath, lang string) *i18n.Bundle
- func LocalizeMessage(args ...interface{}) string
- type GuildSettings
- func (gs *GuildSettings) GetAdminUserIDs() []string
- func (gs *GuildSettings) GetAutoRefresh() bool
- func (gs *GuildSettings) GetCommandPrefix() string
- func (gs *GuildSettings) GetDelay(oldPhase, newPhase game.Phase) int
- func (gs *GuildSettings) GetDeleteGameSummaryMinutes() int
- func (gs *GuildSettings) GetDisplayRoomCode() string
- func (gs *GuildSettings) GetLanguage() string
- func (gs *GuildSettings) GetLeaderboardMention() bool
- func (gs *GuildSettings) GetLeaderboardMin() int
- func (gs *GuildSettings) GetLeaderboardSize() int
- func (gs *GuildSettings) GetMapVersion() string
- func (gs *GuildSettings) GetMatchSummaryChannelID() string
- func (gs *GuildSettings) GetMuteSpectator() bool
- func (gs *GuildSettings) GetPermissionRoleIDs() []string
- func (gs *GuildSettings) GetUnmuteDeadDuringTasks() bool
- func (gs *GuildSettings) GetVoiceRule(isMute bool, phase game.Phase, alive string) bool
- func (gs *GuildSettings) GetVoiceState(alive bool, tracked bool, phase game.Phase) (bool, bool)
- func (gs *GuildSettings) HasAdminPerms(user *discordgo.User) bool
- func (gs *GuildSettings) HasRolePerms(mem *discordgo.Member) bool
- func (gs *GuildSettings) LocalizeMessage(args ...interface{}) string
- func (gs *GuildSettings) SetAdminUserIDs(ids []string)
- func (gs *GuildSettings) SetAutoRefresh(n bool)
- func (gs *GuildSettings) SetCommandPrefix(p string)
- func (gs *GuildSettings) SetDelay(oldPhase, newPhase game.Phase, v int)
- func (gs *GuildSettings) SetDeleteGameSummaryMinutes(num int)
- func (gs *GuildSettings) SetDisplayRoomCode(r string)
- func (gs *GuildSettings) SetLanguage(l string)
- func (gs *GuildSettings) SetLeaderboardMention(v bool)
- func (gs *GuildSettings) SetLeaderboardMin(v int)
- func (gs *GuildSettings) SetLeaderboardSize(v int)
- func (gs *GuildSettings) SetMapVersion(n string)
- func (gs *GuildSettings) SetMatchSummaryChannelID(id string)
- func (gs *GuildSettings) SetMuteSpectator(behavior bool)
- func (gs *GuildSettings) SetPermissionRoleIDs(ids []string)
- func (gs *GuildSettings) SetUnmuteDeadDuringTasks(v bool)
- func (gs *GuildSettings) SetVoiceRule(isMute bool, phase game.Phase, alive string, val bool)
Constants ¶
View Source
const DefaultLang = "en"
View Source
const DefaultLeaderboardMin = 3
View Source
const DefaultLeaderboardSize = 3
View Source
const DefaultLocalePath = "locales/"
Variables ¶
View Source
var GlobalBundle *i18n.Bundle
Functions ¶
func LoadTranslations ¶
func LocalizeMessage ¶
func LocalizeMessage(args ...interface{}) string
Types ¶
type GuildSettings ¶
type GuildSettings struct { AdminUserIDs []string `json:"adminIDs"` PermissionRoleIDs []string `json:"permissionRoleIDs"` CommandPrefix string `json:"commandPrefix"` Language string `json:"language"` VoiceRules game.VoiceRules `json:"voiceRules"` MapVersion string `json:"mapVersion"` Delays game.GameDelays `json:"delays"` DeleteGameSummaryMinutes int `json:"deleteGameSummary"` UnmuteDeadDuringTasks bool `json:"unmuteDeadDuringTasks"` AutoRefresh bool `json:"autoRefresh"` MatchSummaryChannelID string `json:"matchSummaryChannelID"` LeaderboardMention bool `json:"leaderboardMention"` LeaderboardSize int `json:"leaderboardSize"` LeaderboardMin int `json:"leaderboardMin"` MuteSpectator bool `json:"muteSpectator"` DisplayRoomCode string `json:"displayRoomCode"` // contains filtered or unexported fields }
func MakeGuildSettings ¶
func MakeGuildSettings(prefix string) *GuildSettings
func (*GuildSettings) GetAdminUserIDs ¶
func (gs *GuildSettings) GetAdminUserIDs() []string
func (*GuildSettings) GetAutoRefresh ¶
func (gs *GuildSettings) GetAutoRefresh() bool
func (*GuildSettings) GetCommandPrefix ¶
func (gs *GuildSettings) GetCommandPrefix() string
func (*GuildSettings) GetDelay ¶
func (gs *GuildSettings) GetDelay(oldPhase, newPhase game.Phase) int
func (*GuildSettings) GetDeleteGameSummaryMinutes ¶
func (gs *GuildSettings) GetDeleteGameSummaryMinutes() int
func (*GuildSettings) GetDisplayRoomCode ¶
func (gs *GuildSettings) GetDisplayRoomCode() string
func (*GuildSettings) GetLanguage ¶
func (gs *GuildSettings) GetLanguage() string
func (*GuildSettings) GetLeaderboardMention ¶
func (gs *GuildSettings) GetLeaderboardMention() bool
func (*GuildSettings) GetLeaderboardMin ¶
func (gs *GuildSettings) GetLeaderboardMin() int
func (*GuildSettings) GetLeaderboardSize ¶
func (gs *GuildSettings) GetLeaderboardSize() int
func (*GuildSettings) GetMapVersion ¶
func (gs *GuildSettings) GetMapVersion() string
func (*GuildSettings) GetMatchSummaryChannelID ¶
func (gs *GuildSettings) GetMatchSummaryChannelID() string
func (*GuildSettings) GetMuteSpectator ¶
func (gs *GuildSettings) GetMuteSpectator() bool
func (*GuildSettings) GetPermissionRoleIDs ¶
func (gs *GuildSettings) GetPermissionRoleIDs() []string
func (*GuildSettings) GetUnmuteDeadDuringTasks ¶
func (gs *GuildSettings) GetUnmuteDeadDuringTasks() bool
func (*GuildSettings) GetVoiceRule ¶
func (*GuildSettings) GetVoiceState ¶
func (*GuildSettings) HasAdminPerms ¶
func (gs *GuildSettings) HasAdminPerms(user *discordgo.User) bool
func (*GuildSettings) HasRolePerms ¶
func (gs *GuildSettings) HasRolePerms(mem *discordgo.Member) bool
func (*GuildSettings) LocalizeMessage ¶
func (gs *GuildSettings) LocalizeMessage(args ...interface{}) string
func (*GuildSettings) SetAdminUserIDs ¶
func (gs *GuildSettings) SetAdminUserIDs(ids []string)
func (*GuildSettings) SetAutoRefresh ¶
func (gs *GuildSettings) SetAutoRefresh(n bool)
func (*GuildSettings) SetCommandPrefix ¶
func (gs *GuildSettings) SetCommandPrefix(p string)
func (*GuildSettings) SetDelay ¶
func (gs *GuildSettings) SetDelay(oldPhase, newPhase game.Phase, v int)
func (*GuildSettings) SetDeleteGameSummaryMinutes ¶
func (gs *GuildSettings) SetDeleteGameSummaryMinutes(num int)
func (*GuildSettings) SetDisplayRoomCode ¶
func (gs *GuildSettings) SetDisplayRoomCode(r string)
func (*GuildSettings) SetLanguage ¶
func (gs *GuildSettings) SetLanguage(l string)
func (*GuildSettings) SetLeaderboardMention ¶
func (gs *GuildSettings) SetLeaderboardMention(v bool)
func (*GuildSettings) SetLeaderboardMin ¶
func (gs *GuildSettings) SetLeaderboardMin(v int)
func (*GuildSettings) SetLeaderboardSize ¶
func (gs *GuildSettings) SetLeaderboardSize(v int)
func (*GuildSettings) SetMapVersion ¶
func (gs *GuildSettings) SetMapVersion(n string)
func (*GuildSettings) SetMatchSummaryChannelID ¶
func (gs *GuildSettings) SetMatchSummaryChannelID(id string)
func (*GuildSettings) SetMuteSpectator ¶
func (gs *GuildSettings) SetMuteSpectator(behavior bool)
func (*GuildSettings) SetPermissionRoleIDs ¶
func (gs *GuildSettings) SetPermissionRoleIDs(ids []string)
func (*GuildSettings) SetUnmuteDeadDuringTasks ¶
func (gs *GuildSettings) SetUnmuteDeadDuringTasks(v bool)
func (*GuildSettings) SetVoiceRule ¶
Click to show internal directories.
Click to hide internal directories.