From 27f8bcefe3ea3344bae9bfb30da905df6d9c9d7f Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 7 Nov 2019 21:03:11 +0000 Subject: [PATCH] Update oauth.py --- disco/types/oauth.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/disco/types/oauth.py b/disco/types/oauth.py index c231f7c..b0f1742 100644 --- a/disco/types/oauth.py +++ b/disco/types/oauth.py @@ -41,11 +41,11 @@ class Application(SlottedModel): cover_image = Field(text) def user_is_owner(self, user): - user = to_snowflake(user) - if user == self.owner.id: + user_id = to_snowflake(user) + if user_id == self.owner.id: return True - return any(user == member.user.id for member in self.team.members) + return any(user_id == member.user.id for member in self.team.members) def get_icon_url(self, fmt='webp', size=1024): if not self.icon: @@ -69,8 +69,8 @@ class Application(SlottedModel): class ConnectionVisibility(object): - Nobody = 0 - Everyone = 1 + NOBODY = 0 + EVERYONE = 1 class Connection(SlottedModel):