constants

package
v0.0.0-...-7034edb Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlignmentMinLevel = 0
	AlignmentMaxLevel = 100

	NeutralCityColor = 12506502
)
View Source
const (
	ConfigFileName = ".env"

	// Discord Bot Token.
	Token = "TOKEN"

	// Shard ID. More on https://discord.com/developers/docs/topics/gateway#sharding.
	ShardID = "SHARD_ID"

	// Total number of shards used to run the entire application.
	ShardCount = "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"

	// 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-dashboard/master/public/img/kaellyProfile.png"
	AvatarImage        = "https://raw.githubusercontent.com/KaellyBot/Kaelly-dashboard/master/public/img/kaellyFull.png"
	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
	MaxCharacterPerField   = 10
	MaxEquipmentPerField   = 8
	MaxIngredientsPerField = 8
)
View Source
const (
	EmojiIDEffect EmojiMiscID = "effect"
	EmojiIDRecipe EmojiMiscID = "recipe"
	EmojiIDSet    EmojiMiscID = "set"

	EmojiTypeEquipment EmojiType = "Equipment"
	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 (
)
View Source
const (
	DefaultLocale = discordgo.EnglishGB
)
View Source
const (
	KrosmozAlmanaxDateFormat = "2006-01-02"
)

Variables

This section is empty.

Functions

func GetAlmanaxFirstDate

func GetAlmanaxFirstDate() time.Time

func GetAlmanaxLastDate

func GetAlmanaxLastDate() time.Time

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 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 {
	ChannelWebhook
}

type AnkamaGame

type AnkamaGame struct {
	Name  string
	Icon  string
	Emoji string
}

func GetGame

func GetGame() AnkamaGame

type ChannelServer

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

type ChannelWebhook

type ChannelWebhook struct {
	Channel *discordgo.Channel
	Locale  amqp.Language
}

type ContextKey

type ContextKey int
const (
	ContextKeyChannel ContextKey = iota
	ContextKeyCity
	ContextKeyDate
	ContextKeyDimension
	ContextKeyDuration
	ContextKeyEnabled
	ContextKeyFeed
	ContextKeyJob
	ContextKeyLanguage
	ContextKeyLevel
	ContextKeyOrder
	ContextKeyQuery
	ContextKeyServer
	ContextKeyStreamer
	ContextKeyVideast
)

type EmojiMiscID

type EmojiMiscID string

type EmojiType

type EmojiType string

type Graphist

type Graphist struct {
	Name string
	URL  string
}

func GetGraphist

func GetGraphist() 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
	AMQPLocale      amqp.Language
	Collator        *collate.Collator
	TranslationFile string
}

func GetLanguages

func GetLanguages() []Language

type RssWebhook

type RssWebhook struct {
	ChannelWebhook
	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 {
	ChannelWebhook
	StreamerID string
}

type TwitterWebhook

type TwitterWebhook struct {
	ChannelWebhook
	TwitterName string
}

type YoutubeWebhook

type YoutubeWebhook struct {
	ChannelWebhook
	VideastID string
}

Jump to

Keyboard shortcuts

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