|
@@ -836,6 +836,13 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) {
|
|
case *GuildUpdate:
|
|
case *GuildUpdate:
|
|
err = s.GuildAdd(t.Guild)
|
|
err = s.GuildAdd(t.Guild)
|
|
case *GuildDelete:
|
|
case *GuildDelete:
|
|
|
|
+ var old *Guild
|
|
|
|
+ old, err = s.Guild(t.ID)
|
|
|
|
+ if err == nil {
|
|
|
|
+ oldCopy := *old
|
|
|
|
+ t.BeforeDelete = &oldCopy
|
|
|
|
+ }
|
|
|
|
+
|
|
err = s.GuildRemove(t.Guild)
|
|
err = s.GuildRemove(t.Guild)
|
|
case *GuildMemberAdd:
|
|
case *GuildMemberAdd:
|
|
// Updates the MemberCount of the guild.
|
|
// Updates the MemberCount of the guild.
|