Fixed err shadowing
This commit is contained in:
parent
4cc57c5070
commit
ee16996490
1 changed files with 2 additions and 1 deletions
3
state.go
3
state.go
|
@ -863,7 +863,8 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
|
|||
}
|
||||
case *MessageUpdate:
|
||||
if s.MaxMessageCount != 0 {
|
||||
old, err := s.Message(t.ChannelID, t.ID)
|
||||
var old *Message
|
||||
old, err = s.Message(t.ChannelID, t.ID)
|
||||
if err == nil {
|
||||
oldCopy := *old
|
||||
t.BeforeUpdate = &oldCopy
|
||||
|
|
Loading…
Reference in a new issue