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