constants

package
v0.0.0-...-c9dde30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

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 (
)
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 GetAlmanaxFirstDate() time.Time

func GetAlmanaxLastDate

func GetAlmanaxLastDate() time.Time

func GetCharacterNumbers

func GetCharacterNumbers() []int64

25 values with most used character numbers.

func GetDefaultConfigValues

func GetDefaultConfigValues() map[string]any

func GetIntents

func GetIntents() discordgo.Intent

func GetRabbitMQClientID

func GetRabbitMQClientID() string

func MapAMQPLocale

func MapAMQPLocale(locale amqp.Language) discordgo.Locale

func MapCollator

func MapCollator(locale discordgo.Locale) *collate.Collator

func MapDateTranslator

func MapDateTranslator(lg discordgo.Locale) locales.Translator

func MapDiscordLocale

func MapDiscordLocale(locale discordgo.Locale) amqp.Language

func MapTag

func MapTag(locale discordgo.Locale) language.Tag

func SupportedDateFormats

func SupportedDateFormats() []string

Types

type AlignmentUserLevel

type AlignmentUserLevel struct {
	CityID   string
	OrderID  string
	Username string
	Level    int64
}

type AlmanaxWebhook

type AlmanaxWebhook struct {
	Channel *discordgo.Channel
}

type AnkamaGame

type AnkamaGame struct {
	Name     string
	Icon     string
	AMQPGame amqp.Game
}

func GetGame

func GetGame() AnkamaGame

type ChannelServer

type ChannelServer struct {
	Channel  *discordgo.Channel
	ServerID string
}

type CityType

type CityType string

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 EmojiType

type EmojiType string

type Graphist

type Graphist struct {
	Name string
	URL  string
}

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 JobUserLevel struct {
	Username string
	Level    int64
}

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 MapType

type MapType string

type RssWebhook

type RssWebhook struct {
	Channel *discordgo.Channel
	FeedID  string
}

type Season

type Season struct {
	Name        string
	StartDate   time.Time // exclusive
	EndDate     time.Time // exclusive
	Color       int
	AlmanaxIcon string
}

func GetSeason

func GetSeason(date time.Time) Season

func GetUnknownSeason

func GetUnknownSeason() Season

type TwitchWebhook

type TwitchWebhook struct {
	Channel    *discordgo.Channel
	StreamerID string
}

type TwitterWebhook

type TwitterWebhook struct {
	Channel   *discordgo.Channel
	TwitterID string
}

type YoutubeWebhook

type YoutubeWebhook struct {
	Channel   *discordgo.Channel
	VideastID string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL