Skip to content

Commit

Permalink
feat: adding check for same referral and user
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Dec 22, 2023
1 parent ed710cc commit a608b7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ func (b *Bot) messageHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
return
}

if referral.DiscordID == m.Author.ID {
_, _ = s.ChannelMessageSendReply(m.ChannelID, "Sorry, You can't be your own referral😔", m.Reference())
return
}

if pubKey != "" {
// check available balance
balance := b.faucetWallet.GetBalance()
Expand Down

0 comments on commit a608b7e

Please sign in to comment.