Documentation ¶
Index ¶
- Variables
- func GetCommand(l *Language, name string) any
- type CommandCNPJ
- type CommandCPF
- type CommandCat
- type CommandDefinition
- type CommandDog
- type CommandDonate
- type CommandEven
- type CommandFollow
- type CommandFox
- type CommandHelp
- type CommandJoke
- type CommandLanguage
- type CommandLive
- type CommandLyric
- type CommandNews
- type CommandPassword
- type CommandPause
- type CommandPick
- type CommandPing
- type CommandPlay
- type CommandPlaying
- type CommandRadio
- type CommandResume
- type CommandRoll
- type CommandScore
- type CommandServer
- type CommandShuffle
- type CommandSkip
- type CommandSource
- type CommandStop
- type CommandUUID
- type CommandUnFollow
- type CommandUptime
- type CommandVolume
- type CommandXkcd
- type Commands
- type Common
- type Entry
- type Language
- type LanguageName
- type Locale
- type MatchInfo
- type Meta
- type ParameterDefinition
- type ParametersValidations
- type PlayingInfo
- type PreCommandValidation
- type RawJSONMap
- type ValidationMustBeOnAValidVoiceChannel
- type ValidationMustBeOnSameVoiceChannel
- type ValidationMustBeOnVoiceChannel
- type ValidationMustBePlaying
- type ValidationMustHaveVoicerOnGuild
- type Validations
Constants ¶
This section is empty.
Variables ¶
View Source
var ( I18nRootDir = "./assets/i18n" LanguagesName = []LanguageName{EnglishLang, PortugueseLang} )
Functions ¶
func GetCommand ¶
Types ¶
type CommandCNPJ ¶
type CommandCNPJ struct { *Common Definition *CommandDefinition Title Entry WithMask Entry WithoutMask Entry }
type CommandCPF ¶
type CommandCPF struct { *Common Definition *CommandDefinition Title Entry WithMask Entry WithoutMask Entry }
type CommandCat ¶
type CommandCat struct {
Definition *CommandDefinition
}
type CommandDefinition ¶
type CommandDefinition struct { Name Entry Description Entry Parameters []ParameterDefinition SubCommands []CommandDefinition }
func MustGetCommandDefinition ¶
func MustGetCommandDefinition(l *Language, name string) *CommandDefinition
type CommandDog ¶
type CommandDog struct {
Definition *CommandDefinition
}
type CommandDonate ¶
type CommandDonate struct { *Common Definition *CommandDefinition Title Entry }
type CommandEven ¶
type CommandEven struct { *Common Definition *CommandDefinition Even Entry Odd Entry }
type CommandFollow ¶
type CommandFox ¶
type CommandFox struct {
Definition *CommandDefinition
}
type CommandHelp ¶
type CommandHelp struct { *Common RawMap RawJSONMap Definition *CommandDefinition Title Entry Parameters Entry Validations Entry SubCommands Entry Aliases Entry Permission Entry Category Entry AKA Entry ForMoreInfo Entry CommandNotFound Entry SubCommandNotFound Entry RequiresPermission Entry Required Entry NotRequired Entry }
type CommandJoke ¶
type CommandJoke struct {
Definition *CommandDefinition
}
type CommandLanguage ¶
type CommandLive ¶
type CommandLyric ¶
type CommandLyric struct { *Common Definition *CommandDefinition NothingPlaying Entry NoResults Entry NotConnected Entry }
type CommandNews ¶
type CommandNews struct { *Common Definition *CommandDefinition Title Entry Unknown Entry SeeMore Entry }
type CommandPassword ¶
type CommandPassword struct { *Common Definition *CommandDefinition Title Entry Description Entry }
type CommandPause ¶
type CommandPause struct { *Common Definition *CommandDefinition CannotPause Entry AlreadyPaused Entry Paused Entry }
type CommandPick ¶
type CommandPick struct { *Common Definition *CommandDefinition Title Entry Description Entry }
type CommandPing ¶
type CommandPing struct { *Common Definition *CommandDefinition Title Entry APILatency Entry StillCalculating Entry }
type CommandPlay ¶
type CommandPlay struct { *Common Definition *CommandDefinition CannotConnect Entry YouTubePlaylist Entry BestResult Entry MultipleResults Entry MultipleResultsSelectOne Entry FirstResultWillPlay Entry IfYouFailToSelect Entry Entry Entry SelectedResult Entry ConfirmBtn Entry PlayOtherBtn Entry CancelBtn Entry }
type CommandPlaying ¶
type CommandRadio ¶
type CommandRadio struct { *Common Definition *CommandDefinition ListTitle Entry CannotConnect Entry AddedToQueue Entry }
type CommandResume ¶
type CommandResume struct { *Common Definition *CommandDefinition NotPaused Entry Resumed Entry }
type CommandRoll ¶
type CommandScore ¶
type CommandScore struct { *Common Definition *CommandDefinition MatchNotFound Entry LiveUpdates Entry }
type CommandServer ¶
type CommandServer struct { *Common Definition *CommandDefinition Title Entry ServerOptionsChanged Entry }
type CommandShuffle ¶
type CommandShuffle struct { *Common Definition *CommandDefinition Shuffled Entry }
type CommandSkip ¶
type CommandSkip struct { *Common Definition *CommandDefinition Skipped Entry }
type CommandSource ¶
type CommandSource struct { *Common Definition *CommandDefinition Description Entry }
type CommandStop ¶
type CommandStop struct { *Common Definition *CommandDefinition Stopped Entry }
type CommandUUID ¶
type CommandUUID struct {
Definition *CommandDefinition
}
type CommandUnFollow ¶
type CommandUptime ¶
type CommandVolume ¶
type CommandVolume struct { *Common Definition *CommandDefinition }
type CommandXkcd ¶
type CommandXkcd struct {
Definition *CommandDefinition
}
type Commands ¶
type Commands struct { Even *CommandEven Pick *CommandPick News *CommandNews Roll *CommandRoll Follow *CommandFollow UnFollow *CommandUnFollow Live *CommandLive Score *CommandScore CNPJ *CommandCNPJ CPF *CommandCPF Password *CommandPassword Source *CommandSource Ping *CommandPing Donate *CommandDonate Uptime *CommandUptime Resume *CommandResume Shuffle *CommandShuffle Skip *CommandSkip Stop *CommandStop Lyric *CommandLyric Pause *CommandPause Volume *CommandVolume Playing *CommandPlaying Radio *CommandRadio Help *CommandHelp Play *CommandPlay Dog *CommandDog Cat *CommandCat Fox *CommandFox UUID *CommandUUID Joke *CommandJoke Xkcd *CommandXkcd Language *CommandLanguage Server *CommandServer }
type Common ¶
type Common struct { HelloWorld Entry SomethingWentWrong Entry Took Entry TranslationInProgress Entry MatchInfo *MatchInfo PlayingInfo *PlayingInfo DurationNow Entry DurationLessThanAMinute Entry DurationDay Entry DurationDays Entry DurationHour Entry DurationHours Entry DurationMinute Entry DurationMinutes Entry DurationSecond Entry DurationSeconds Entry Validations *Validations Categories map[string]Entry }
type Language ¶
type Language struct { *Meta `json:"meta"` *Common `json:"common"` *Locale `json:"locale"` Commands *Commands RawMap RawJSONMap `json:"-"` // contains filtered or unexported fields }
func GetLanguage ¶
func GetLanguage(name LanguageName) (*Language, error)
func MustGetLanguage ¶
func MustGetLanguage(name LanguageName) *Language
type LanguageName ¶
type LanguageName string
const ( EnglishLang LanguageName = "en_US" PortugueseLang LanguageName = "pt_BR" DefaultLanguageName = EnglishLang )
func FindLanguageName ¶
func FindLanguageName(name string) LanguageName
func (LanguageName) DiscordName ¶
func (l LanguageName) DiscordName() string
type Locale ¶
type Locale struct { SimpleDateTimeFormat string // contains filtered or unexported fields }
type Meta ¶
type Meta struct { Name LanguageName DisplayName Entry Authors Entry }
type ParameterDefinition ¶
type ParametersValidations ¶
type PlayingInfo ¶
type PreCommandValidation ¶
type RawJSONMap ¶
type ValidationMustBePlaying ¶
type Validations ¶
type Validations struct { MustHaveVoicerOnGuild *ValidationMustHaveVoicerOnGuild MustBePlaying *ValidationMustBePlaying MustBeOnVoiceChannel *ValidationMustBeOnVoiceChannel MustBeOnAValidVoiceChannel *ValidationMustBeOnAValidVoiceChannel MustBeOnSameVoiceChannel *ValidationMustBeOnSameVoiceChannel PreCommandValidation *PreCommandValidation ParametersValidations *ParametersValidations }
Click to show internal directories.
Click to hide internal directories.