From bb1ec000b0485125c3c923e132196d289cee5cf1 Mon Sep 17 00:00:00 2001
From: Luke Mathew-Byrne <Luke@LMByrne.dev>
Date: Tue, 3 Sep 2019 15:32:39 +0100
Subject: [PATCH] Fix logic on GuildCreate and GuildDelete shotcut properties.

---
 disco/gateway/events.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/disco/gateway/events.py b/disco/gateway/events.py
index ab45662..0132f59 100644
--- a/disco/gateway/events.py
+++ b/disco/gateway/events.py
@@ -7,7 +7,7 @@ from disco.types.channel import Channel, PermissionOverwrite
 from disco.types.message import Message, MessageReactionEmoji
 from disco.types.voice import VoiceState
 from disco.types.guild import Guild, GuildMember, Role, GuildEmoji
-from disco.types.base import Model, ModelMeta, Field, ListField, AutoDictField, snowflake, datetime
+from disco.types.base import Model, ModelMeta, Field, ListField, AutoDictField, UNSET, snowflake, datetime
 from disco.util.string import underscore
 
 # Mapping of discords event name to our event classes
@@ -163,7 +163,7 @@ class GuildCreate(GatewayEvent):
         The guild being created (e.g. joined)
     unavailable : bool
         If false, this guild is coming online from a previously unavailable state,
-        and if None, this is a normal guild join event.
+        and if UNSET, this is a normal guild join event.
     """
     unavailable = Field(bool)
     presences = ListField(Presence)
@@ -173,7 +173,7 @@ class GuildCreate(GatewayEvent):
         """
         Shortcut property which is true when we actually joined the guild.
         """
-        return self.unavailable is None
+        return self.unavailable is UNSET
 
 
 @wraps_model(Guild)
@@ -197,7 +197,7 @@ class GuildDelete(GatewayEvent):
     id : snowflake
         The ID of the guild being deleted.
     unavailable : bool
-        If true, this guild is becoming unavailable, if None this is a normal
+        If true, this guild is becoming unavailable, if UNSET this is a normal
         guild leave event.
     """
     id = Field(snowflake)
@@ -208,7 +208,7 @@ class GuildDelete(GatewayEvent):
         """
         Shortcut property which is true when we actually have left the guild.
         """
-        return self.unavailable is None
+        return self.unavailable is UNSET
 
 
 @wraps_model(Channel)