go: discord/modules: Fix '!votesuggest' command

master
Luther Wen Xu 2019-10-18 11:30:30 +07:00
parent 27158b2afb
commit a68565f215
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 3 additions and 3 deletions

@ -97,7 +97,7 @@ func CheckForVote(s *discordgo.Session, r *discordgo.MessageReactionAdd) {
var voteSuggestion = enforceDM(enforceArgumentCount(
config.VoteSuggestionUsage, 3,
func(s *discordgo.Session, m *discordgo.MessageCreate, command []string) {
if len(command[1]) > 500 {
if len(command[2]) > 500 {
message.InitNewEmbed(
config.VoteSuggestionErrorTitle,
config.ErrorVoteSuggestionTooLong,
@ -106,7 +106,7 @@ var voteSuggestion = enforceDM(enforceArgumentCount(
return
}
switch command[0] {
switch command[1] {
case "custom":
msg, err := message.InitNewEmbed(
config.VoteSuggestionUpcomingTitle,
@ -117,7 +117,7 @@ var voteSuggestion = enforceDM(enforceArgumentCount(
message.AuditErrorPM(s, m.Author.ID, err)
return
}
id, err := db.CreateCustomVote(msg.ID, command[1])
id, err := db.CreateCustomVote(msg.ID, command[2])
if err != nil {
message.AuditErrorPM(s, m.Author.ID, err)
return