|
|
@ -71,10 +71,13 @@ func CheckForVote(s *discordgo.Session, r *discordgo.MessageReactionAdd) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var voteName string
|
|
|
|
var voteName, voteType string
|
|
|
|
if err == nil {
|
|
|
|
if err == nil {
|
|
|
|
voteName, err = db.GetVoteName(voteID)
|
|
|
|
voteName, err = db.GetVoteName(voteID)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if err == nil {
|
|
|
|
|
|
|
|
voteType, err = db.GetVoteType(voteID)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
message.AuditErrorPM(s, r.UserID, err)
|
|
|
|
message.AuditErrorPM(s, r.UserID, err)
|
|
|
@ -83,7 +86,7 @@ func CheckForVote(s *discordgo.Session, r *discordgo.MessageReactionAdd) {
|
|
|
|
|
|
|
|
|
|
|
|
message.InitNewEmbed(config.VoteSuccessfulTitle, "", config.SuccessColour).
|
|
|
|
message.InitNewEmbed(config.VoteSuccessfulTitle, "", config.SuccessColour).
|
|
|
|
AddField(config.VoteSuccessfulVoteID, strconv.Itoa(voteID)).
|
|
|
|
AddField(config.VoteSuccessfulVoteID, strconv.Itoa(voteID)).
|
|
|
|
AddField(config.VoteSuccessfulVoteName, voteName).
|
|
|
|
AddField(config.VoteSuccessfulVoteName, voteTypes[voteType].FormatName(voteName)).
|
|
|
|
AddField(config.VoteSuccessfulDetectedVote, r.Emoji.Name).
|
|
|
|
AddField(config.VoteSuccessfulDetectedVote, r.Emoji.Name).
|
|
|
|
SendPM(s, r.UserID)
|
|
|
|
SendPM(s, r.UserID)
|
|
|
|
message.AuditInfo(s, fmt.Sprintf("<@%s> has chosen %s for vote ID %d.", r.UserID, r.Emoji.Name, voteID))
|
|
|
|
message.AuditInfo(s, fmt.Sprintf("<@%s> has chosen %s for vote ID %d.", r.UserID, r.Emoji.Name, voteID))
|
|
|
|