Documentation
¶
Index ¶
- Constants
- func GetAlmanaxDayDuration() []int64
- func GetAlmanaxFirstDate() time.Time
- func GetAlmanaxLastDate() time.Time
- func GetCharacterNumbers() []int64
- func GetDefaultConfigValues() map[string]any
- func GetIntents() discordgo.Intent
- func GetRabbitMQClientID() string
- func MapAMQPLocale(locale amqp.Language) discordgo.Locale
- func MapCollator(locale discordgo.Locale) *collate.Collator
- func MapDateTranslator(lg discordgo.Locale) locales.Translator
- func MapDiscordLocale(locale discordgo.Locale) amqp.Language
- func MapTag(locale discordgo.Locale) language.Tag
- func SupportedDateFormats() []string
- type AlignmentUserLevel
- type AlmanaxWebhook
- type AnkamaGame
- type ChannelServer
- type CityType
- type ContextKey
- type EmojiMiscID
- type EmojiType
- type Graphist
- type GuildConfig
- type JobUserLevel
- type Language
- type MapType
- type RssWebhook
- type Season
- type TwitchWebhook
- type TwitterWebhook
- type YoutubeWebhook
Constants ¶
View Source
const ( AlignmentMinLevel = 0 AlignmentMaxLevel = 100 CityTypeDark CityType = "dark" CityTypeLight CityType = "light" NeutralCityColor = 12506502 )
View Source
const ( AboutRoutingKey = "requests.about" AlignRequestRoutingKey = "requests.books" AlmanaxRequestRoutingKey = "requests.encyclopedias" CompetitionRequestRoutingKey = "requests.competitions" ConfigurationRequestRoutingKey = "requests.configs" HelpRoutingKey = "requests.help" ItemRequestRoutingKey = "requests.encyclopedias" JobRequestRoutingKey = "requests.books" PortalRequestRoutingKey = "requests.portals" SetRequestRoutingKey = "requests.encyclopedias" GuildNewsRoutingKey = "news.guilds" )
View Source
const ( ConfigFileName = ".env" // Discord Bot Token. DiscordToken = "DISCORD_TOKEN" // Shard ID. More on https://discord.com/developers/docs/topics/gateway#sharding. DiscordShardID = "DISCORD_SHARD_ID" // Total number of shards used to run the entire application. DiscordShardCount = "DISCORD_SHARD_COUNT" // MySQL URL with the following format: HOST:PORT. MySQLURL = "MYSQL_URL" // MySQL user. MySQLUser = "MYSQL_USER" // MySQL password. MySQLPassword = "MYSQL_PASSWORD" // MySQL database name. MySQLDatabase = "MYSQL_DATABASE" // RabbitMQ address. RabbitMQAddress = "RABBITMQ_ADDRESS" // About command ID. AboutID = "ABOUT_ID" // Align command ID. AlignID = "ALIGN_ID" // Almanax command ID. AlmanaxID = "ALMANAX_ID" // Config command ID. ConfigID = "CONFIG_ID" // Help command ID. HelpID = "HELP_ID" // Item command ID. ItemID = "ITEM_ID" // Job command ID. JobID = "JOB_ID" // Map command ID. MapID = "MAP_ID" // Pos command ID. PosID = "POS_ID" // Set command ID. SetID = "SET_ID" // Probe port. ProbePort = "PROBE_PORT" // Metric port. MetricPort = "METRIC_PORT" // Zerolog values from [trace, debug, info, warn, error, fatal, panic]. LogLevel = "LOG_LEVEL" // Boolean; used to register commands at development guild level or globally. Production = "PRODUCTION" )
View Source
const ( Name = "KaellyBot" Version = "2.0.0" Color = 12543562 AvatarIcon = "https://raw.githubusercontent.com/kaellybot/kaelly-cdn/refs/heads/main/kaellybot/id/face.webp" AvatarImage = "https://raw.githubusercontent.com/kaellybot/kaelly-cdn/refs/heads/main/kaellybot/id/full_body.webp" AvatarWebhook = "" /* 33450-byte string literal not displayed */ Invite = "https://discordapp.com/oauth2/authorize?&client_id=202916641414184960&scope=bot" Discord = "https://discordapp.com/invite/CyJCFDk" Twitter = "https://twitter.com/KaellyBot" Github = "https://github.com/KaellyBot" Paypal = "https://paypal.me/kaysoro" DevelopmentGuildID = "299167247279194112" )
View Source
const ( InvisibleCharacter = "\u200b" MaxButtonPerActionRow = 5 MaxAlmanaxEffectPerEmbed = 5 MaxBookRowPerEmbed = 15 MaxCharacterPerField = 10 MaxEquipmentPerField = 8 MaxIngredientsPerField = 8 MemberListLimit = 1000 DefaultPage = 0 MaxChoices = 25 )
View Source
const ( DiscordCodeNotFound = 0 // 404: Not Found. DiscordCodeTooManyWebhooks = 30007 // Maximum number of webhooks reached (15). )
View Source
const ( EmojiIDAlmanax EmojiMiscID = "almanax" EmojiIDCalendar EmojiMiscID = "calendar" EmojiIDCost EmojiMiscID = "cost" EmojiIDCritical EmojiMiscID = "critical" EmojiIDEffect EmojiMiscID = "effect" EmojiIDFirst EmojiMiscID = "first" EmojiIDGame EmojiMiscID = "dofusGame" EmojiIDGithub EmojiMiscID = "github" EmojiIDKama EmojiMiscID = "kama" EmojiIDLast EmojiMiscID = "last" EmojiIDNext EmojiMiscID = "next" EmojiIDNormalMap EmojiMiscID = "normalMap" EmojiIDPrevious EmojiMiscID = "previous" EmojiIDRange EmojiMiscID = "range" EmojiIDRecipe EmojiMiscID = "recipe" EmojiIDRSS EmojiMiscID = "rss" EmojiIDTacticalMap EmojiMiscID = "tacticalMap" EmojiIDTwitch EmojiMiscID = "twitch" EmojiIDTwitter EmojiMiscID = "twitter" EmojiIDYoutube EmojiMiscID = "youtube" EmojiTypeEquipment EmojiType = "Equipment" EmojiTypeItem EmojiType = "Item" EmojiTypeBonusSet EmojiType = "BonusSet" EmojiTypeMisc EmojiType = "Miscellaneous" )
View Source
const ( JobMinLevel = 0 JobMaxLevel = 200 )
View Source
const ( LogCommand = "command" LogCommandOption = "option" LogGuildCount = "guildCount" LogGuildID = "guildID" LogChannelID = "channelID" LogCustomID = "customID" LogEntity = "entity" LogEntityCount = "entityCount" LogAnkamaID = "ankamaID" LogItemNumber = "itemNumber" LogItemType = "itemType" LogEmojiType = "emojiType" LogRequestProperty = "requestProperty" LogRequestValue = "requestValue" LogInteractionType = "interactionType" LogShard = "shard" LogFileName = "fileName" LogLocale = "locale" LogPanic = "panic" LogLevelFallback = zerolog.InfoLevel )
View Source
const ( MapTypeNormal MapType = "normal" MapTypeTactical MapType = "tactical" MapNumberMin = 1 MapNumberMax = 50 )
View Source
const (
AnkamaLogo = "https://raw.githubusercontent.com/kaellybot/kaelly-cdn/refs/heads/main/common/logos/ankama.webp"
)
View Source
const (
DefaultLocale = discordgo.EnglishGB
)
View Source
const (
DiscordDateOnlyFormat = "02/01/2006"
)
View Source
const (
KrosmozAlmanaxDateFormat = "2006-01-02"
)
Variables ¶
This section is empty.
Functions ¶
func GetAlmanaxDayDuration ¶
func GetAlmanaxDayDuration() []int64
25 values with most used days duration.
func GetAlmanaxFirstDate ¶
func GetAlmanaxLastDate ¶
func GetCharacterNumbers ¶
func GetCharacterNumbers() []int64
25 values with most used character numbers.
func GetDefaultConfigValues ¶
func GetIntents ¶
func GetRabbitMQClientID ¶
func GetRabbitMQClientID() string
func MapDateTranslator ¶
func MapDateTranslator(lg discordgo.Locale) locales.Translator
func SupportedDateFormats ¶
func SupportedDateFormats() []string
Types ¶
type AlignmentUserLevel ¶
type AlmanaxWebhook ¶
type AnkamaGame ¶
func GetGame ¶
func GetGame() AnkamaGame
type ChannelServer ¶
type ContextKey ¶
type ContextKey int
const ( ContextKeyChannel ContextKey = iota ContextKeyCity ContextKeyDate ContextKeyDimension ContextKeyDuration ContextKeyEnabled ContextKeyFeed ContextKeyJob ContextKeyLanguage ContextKeyLevel ContextKeyMap ContextKeyOrder ContextKeyQuery ContextKeyServer ContextKeyStreamer ContextKeyTwitter ContextKeyVideast )
type EmojiMiscID ¶
type EmojiMiscID string
type Graphist ¶
func GetGraphistColibry ¶
func GetGraphistColibry() Graphist
func GetGraphistElycann ¶
func GetGraphistElycann() Graphist
type GuildConfig ¶
type GuildConfig struct { Name string Icon string ServerID string ChannelServers []ChannelServer AlmanaxWebhooks []AlmanaxWebhook RssWebhooks []RssWebhook TwitchWebhooks []TwitchWebhook TwitterWebhooks []TwitterWebhook YoutubeWebhooks []YoutubeWebhook }
type JobUserLevel ¶
type Language ¶
type Language struct { Locale discordgo.Locale Tag language.Tag DateTranslator locales.Translator AMQPLocale amqp.Language Collator *collate.Collator TranslationFile string }
func GetLanguages ¶
func GetLanguages() []Language
type RssWebhook ¶
type Season ¶
type Season struct { Name string StartDate time.Time // exclusive EndDate time.Time // exclusive Color int AlmanaxIcon string }
func GetUnknownSeason ¶
func GetUnknownSeason() Season
type TwitchWebhook ¶
type TwitterWebhook ¶
type YoutubeWebhook ¶
Click to show internal directories.
Click to hide internal directories.