package modules import ( "github.com/bwmarrin/discordgo" "TerraOceanBot/discord/message" ) type voteType struct { EmbedBuilder func(id int, name string) *message.Embed FormatName func(internalName string) string ResultHandler func(s *discordgo.Session, id int, name string, isPositive bool) } var voteTypes = map[string]voteType{ "custom": voteType{ EmbedBuilder: createCustomEmbed, FormatName: formatCustomName, ResultHandler: announceCustomResult, }, "invite": voteType{ EmbedBuilder: createInviteEmbed, FormatName: formatInviteName, ResultHandler: handleInviteResult, }, }