Documentation ¶
Index ¶
- Variables
- type Backend
- func (b *Backend) AddVote(userID snowflake.ID, botList BotList, multiplier int) error
- func (b *Backend) LoadCommands(commands ...handler.Command)
- func (b *Backend) SetupPrometheusAPI() error
- func (b *Backend) SetupRestServices()
- func (b *Backend) SetupScheduler() error
- func (b *Backend) SetupServer(handler http.Handler)
- func (b *Backend) VoteTask(ctx context.Context)
- type BotList
- type BotListsConfig
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TopGG = BotList{ Name: "top_gg", URL: "https://top.gg", BotURL: "/dbot/%s", VoteCooldown: 12 * time.Hour, } BotListSpace = BotList{ Name: "botlist_space", URL: "https://botlist.space", BotURL: "/dbot/%s", VoteCooldown: 24 * time.Hour, } DiscordBotsGG = BotList{ Name: "discord_bots_gg", URL: "https://botlist.space", BotURL: "/bots/%s", } DiscordExtremeListXYZ = BotList{ Name: "discord_extreme_list_xyz", URL: "https://discordextremelist.xyz", BotURL: "/bots/%s", } BotsForDiscordCom = BotList{ Name: "bots_for_discord_com", URL: "https://botsfordiscord.com", BotURL: "/dbot/%s", VoteCooldown: 24 * time.Hour, } DiscordBotListCom = BotList{ Name: "discord_bot_list_com", URL: "https://discordbotlist.com", BotURL: "/bots/%s", VoteCooldown: 12 * time.Hour, } DiscordservicesNet = BotList{ Name: "discordservices_net", URL: "https://discordservices.net", BotURL: "/dbot/%s", VoteCooldown: 12 * time.Hour, } )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { Logger log.Logger DB db.DB Rest rest.Rest PrometheusAPI v1.API HTTPServer *http.Server Scheduler chrono.TaskScheduler Commands []discord.ApplicationCommandCreate Config Config Version string }
func (*Backend) LoadCommands ¶
func (*Backend) SetupPrometheusAPI ¶
func (*Backend) SetupRestServices ¶
func (b *Backend) SetupRestServices()
func (*Backend) SetupScheduler ¶
func (*Backend) SetupServer ¶
type BotListsConfig ¶
Click to show internal directories.
Click to hide internal directories.