Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choice ¶
type Choice struct { // Selection is the choice Selection string // Votes is the number of votes for the choice Votes int }
Choice is a choice in a rank choice vote
type GoogleConfig ¶
type GoogleConfig struct { // Enabled is whether or not google sheets is enabled Enabled bool // KeyFile is the path to the JSON key file KeyFile string // SheetName is the name of the sheet SheetName string // SheetID is the ID of the sheet SheetID string }
GoogleConfig is the config for google sheets
type LoggingConfig ¶
type LoggingConfig struct { // Level is the log level Level string // DebugLowChannel is the channel to log debug messages to DebugLowChannel string // DebugHighChannel is the channel to log debug messages to DebugChannel string // InfoChannel is the channel to log info messages to InfoChannel string // WarningChannel is the channel to log warning messages to WarningChannel string // ErrorChannel is the channel to log error messages to ErrorChannel string // CriticalChannel is the channel to log critical messages to CriticalChannel string // AuditChannel is the channel to log audit messages to AuditChannel string // LogFile is the file to log to LogFile string }
type MailGunConfig ¶
type MailGunConfig struct { // Domain is the domain to send emails from Domain string // APIKey is the API key to use APIKey string }
MailGunConfig is the config for mailgun
type RankChoiceVote ¶
type RankChoiceVote struct { // Title is the title of the vote Title string // Options is the options in the vote Options []string // Winner is the winner of the vote Winner string // Rounds is the rounds of the vote Rounds []Round // Eliminations is the eliminations of the vote Eliminations []string }
RankChoiceVote is a rank choice vote
func (RankChoiceVote) HTML ¶
func (r RankChoiceVote) HTML() string
ConvertToSanKeyRows converts a map of rounds to a SanKeyRowss
func (RankChoiceVote) String ¶
func (r RankChoiceVote) String() string
ConvertToSanKeyRows converts a map of rounds to a SanKeyRows
type Round ¶
type Round struct { // Choices is the choices in the round Choices []Choice }
Round is a round of voting
type SanKeyRow ¶
type SanKeyRow struct { // From is the from node From string // To is the to node To string // Weight is the weight of the node Weight int }
SanKeyRow is a row in a sankey diagram
type SanKeyRows ¶
type SanKeyRows struct { // Rows is the rows in the sankey diagram Rows []SanKeyRow }
SanKeyRows is a list of rows in a sankey diagram
func (SanKeyRows) String ¶
func (s SanKeyRows) String() string
String returns the string representation of a SanKeyRows
type SlashCommand ¶
type SlashCommand struct { // Command is the command to register Command *discordgo.ApplicationCommand // Handler is the handler for the command Handler func(s *discordgo.Session, i *discordgo.InteractionCreate) }
SlashCommand is a struct that represents a slash command
Click to show internal directories.
Click to hide internal directories.