go: Give feedback for '!validate' command

pull/7/head
Luther Wen Xu 2019-10-12 15:00:21 +07:00
parent 45297d2c64
commit 2b5c88059d
Signed by: 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
}
useInvite(messageSplit[1])
member, err := s.GuildMember(guildID, inviter)
if err != nil {
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
}
useInvite(messageSplit[1])
channel, err := s.UserChannelCreate(inviter)
if err != nil {
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, 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) {