20 lines
448 B
Go
20 lines
448 B
Go
package modules
|
|
|
|
import "github.com/bwmarrin/discordgo"
|
|
|
|
type voteType struct {
|
|
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,
|
|
},
|
|
}
|