forked from chanbakjsd/TerraOceanPlugin
21 lines
525 B
Go
21 lines
525 B
Go
|
package modules
|
||
|
|
||
|
import (
|
||
|
"strconv"
|
||
|
|
||
|
"github.com/bwmarrin/discordgo"
|
||
|
|
||
|
"TerraOceanBot/discord/config"
|
||
|
)
|
||
|
|
||
|
func createCustomEmbed(id int, name string) *embed {
|
||
|
return initNewEmbed(config.CustomVoteTitle, "", config.CustomVoteColour).
|
||
|
AddField(config.CustomVoteVoteID, strconv.Itoa(id)).
|
||
|
AddField(config.CustomVoteContent, name)
|
||
|
}
|
||
|
|
||
|
func announceCustomResult(s *discordgo.Session, id int, name string, isPositive bool) {
|
||
|
createCustomEmbed(id, name).UpdateVoteStatus(isPositive).
|
||
|
Send(s, config.AnnounceCustomChannel)
|
||
|
}
|