beers: fix bad indirection issue

This commit is contained in:
Chris Sexton 2019-02-15 15:12:09 -05:00
parent 120a9474de
commit 6a1cabc2aa
1 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ func New(b bot.Bot) *BeersPlugin {
);`); err != nil {
log.Fatal(err)
}
p := BeersPlugin{
p := &BeersPlugin{
Bot: b,
db: b.DB(),
}
@ -57,7 +57,7 @@ func New(b bot.Bot) *BeersPlugin {
}
b.Register(p, bot.Message, p.message)
b.Register(p, bot.Help, p.help)
return &p
return p
}
// Message responds to the bot hook on recieving messages.