Skip to content

Commit

Permalink
Fix index out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedza committed May 3, 2021
1 parent 1458710 commit 1108cfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sniper.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ func messageCreate(s *discordgo.Session, m_temp *discordgo.MessageCreate) {
var m *discordgo.Message

nms, _ := s.ChannelMessages(m_temp.ChannelID, 1, "", "", "")
if len(nms) < 1 {
return
}
m = nms[0]

if reGiftLink.Match([]byte(m.Content)) && SniperRunning {
Expand Down

0 comments on commit 1108cfb

Please sign in to comment.