diff --git a/bot/bot.go b/bot/bot.go index a4976f6..93c05b7 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -239,7 +239,12 @@ func (b *Bot) NewRequester(i *discordgo.Interaction) (*Requester, error) { return nil, err } } - return NewRequesterFromUser(u, b.Model.User) + r, err := NewRequesterFromUser(u, b.Model.User) + if err != nil { + return r, err + } + r.Member = i.Member + return r, nil } if i.Member != nil { return NewRequesterFromMember(i.Member, b.Model.User) diff --git a/bot/requester.go b/bot/requester.go index 451933e..222b6a7 100644 --- a/bot/requester.go +++ b/bot/requester.go @@ -29,7 +29,7 @@ var ( // NewRequesterFromMember returns a new *Requester pointer from a given *discordgo.Member func NewRequesterFromMember(m *discordgo.Member, um *model.UserModel) (*Requester, error) { - r := &Requester{UserModel: um} + r := &Requester{UserModel: um, Member: m} if m == nil { return r, ErrMemberNil } diff --git a/bot/version.go b/bot/version.go index 1568062..1ae3c27 100644 --- a/bot/version.go +++ b/bot/version.go @@ -1,3 +1,3 @@ package bot -const Version = "0.2.2" +const Version = "0.2.4"