diff --git a/GoBot/discord/modules/vote_listener.go b/GoBot/discord/modules/vote_listener.go index b4aaf12..f986b83 100644 --- a/GoBot/discord/modules/vote_listener.go +++ b/GoBot/discord/modules/vote_listener.go @@ -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