go: Give feedback for '!validate' command

master
Luther Wen Xu 2019-10-12 15:00:21 +07:00
parent 45297d2c64
commit 2b5c88059d
Signed by untrusted user: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 2 additions and 2 deletions

@ -92,6 +92,7 @@ func checkUseInvite(s *discordgo.Session, m *discordgo.MessageCreate, command []
return return
} }
useInvite(messageSplit[1])
member, err := s.GuildMember(guildID, inviter) member, err := s.GuildMember(guildID, inviter)
if err != nil { if err != nil {
sendPrivateMessage(s, m.Author.ID, "验证码制造者不是会员。\nValidation code creator is no longer a member.") sendPrivateMessage(s, m.Author.ID, "验证码制造者不是会员。\nValidation code creator is no longer a member.")
@ -109,8 +110,6 @@ func checkUseInvite(s *discordgo.Session, m *discordgo.MessageCreate, command []
return return
} }
useInvite(messageSplit[1])
channel, err := s.UserChannelCreate(inviter) channel, err := s.UserChannelCreate(inviter)
if err != nil { if err != nil {
sendPrivateMessage(s, m.Author.ID, "验证码制造者关闭了私信。\nValidation code creator did not enable DMs.") sendPrivateMessage(s, m.Author.ID, "验证码制造者关闭了私信。\nValidation code creator did not enable DMs.")
@ -127,6 +126,7 @@ func checkUseInvite(s *discordgo.Session, m *discordgo.MessageCreate, command []
} }
s.MessageReactionAdd(channel.ID, msg.ID, emojiX) s.MessageReactionAdd(channel.ID, msg.ID, emojiX)
s.MessageReactionAdd(channel.ID, msg.ID, emojiCheck) s.MessageReactionAdd(channel.ID, msg.ID, emojiCheck)
sendPrivateMessage(s, m.Author.ID, "已向验证码制造者发送了请求。\nSent a request to use the validation code to its creator.")
} }
func checkForInvite(s *discordgo.Session, r *discordgo.MessageReactionAdd) { func checkForInvite(s *discordgo.Session, r *discordgo.MessageReactionAdd) {