21 lines
506 B
Go
21 lines
506 B
Go
package modules
|
|
|
|
import "github.com/bwmarrin/discordgo"
|
|
|
|
type voteType struct {
|
|
//TODO Add FormatName(name string) to clean up vote name
|
|
EmbedBuilder func(id int, name string) *embed
|
|
ResultHandler func(s *discordgo.Session, id int, name string, isPositive bool)
|
|
}
|
|
|
|
var voteTypes = map[string]voteType{
|
|
"custom": voteType{
|
|
EmbedBuilder: createCustomEmbed,
|
|
ResultHandler: announceCustomResult,
|
|
},
|
|
"invite": voteType{
|
|
EmbedBuilder: createInviteEmbed,
|
|
ResultHandler: handleInviteResult,
|
|
},
|
|
}
|