disgord: Panic when guild.Members

Describe the bug When I try to get a member comes out panic runtime error

Error messages

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x148 pc=0x7af536]

goroutine 56 [running]:
github.com/andersfylling/disgord.(*Guild).Member(0x0, 0x4814a6ef9c40003, 0x0, 0x0, 0x0)
        /home/juby/go/pkg/mod/github.com/andersfylling/disgord@v0.11.1/guild.go:478 +0x26

Desktop (please complete the following information):

  • Golang version: go1.12 linux/amd64
  • Using Go modules? yes

Additional context My code:

				msg := data.Message
				g, _ := s.GetGuild(msg.GuildID)
				m, _ := g.Member(msg.Author.ID)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Oh ok upgrade to v0.11.2 fixed this, thanks 😃