Skip to content

Commit

Permalink
Remove '?' From Args
Browse files Browse the repository at this point in the history
Removed the '?' from args in channel.py and member.py

I couldn't find any other '?'s that are in object args. If you see any while reviewing, lmk so I can fix it.
  • Loading branch information
Astr0clad committed Jan 4, 2022
1 parent 74e7a2e commit 743548c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
46 changes: 23 additions & 23 deletions discordSplash/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,30 @@ def __init__(self, jsonData: dict):
# Channel data variables
self.id = int(self.channelData.get("id"))
self.type = self.channelData.get("type")
self.guild_id = int(self.channelData.get("guild_id?"))
self.position = self.channelData.get("position?")
self.guild_id = int(self.channelData.get("guild_id"))
self.position = self.channelData.get("position")
self.permission_overwrites = self.channelData.get(
"permission_overwrites?") # TODO: Add an Overwrite object - https://discord.com/developers/docs/resources/channel#overwrite-object
self.name = self.channelData.get("name?")
self.topic = self.channelData.get("topic?")
self.nsfw = self.channelData.get("nsfw?")
self.last_message_id = int(self.channelData.get("last_message_id?"))
self.bitrate = self.channelData.get("bitrate?")
self.user_limit = self.channelData.get("user_limit?")
self.rate_limit_per_user = self.channelData.get("rate_limit_per_user?")
self.recipients = self.channelData.get("recipients?")
self.icon = self.channelData.get("icon?")
self.owner_id = int(self.channelData.get("owner_id?"))
self.application_id = int(self.channelData.get("application_id?"))
self.parent_id = int(self.channelData.get("parent_id?"))
self.last_pin_timestamp = datetime.fromisoformat(self.channelData.get("last_pin_timestamp?"))
self.rtc_region = self.channelData.get("rtc_region?")
self.video_quality_mode = self.channelData.get("video_quality_mode?")
"permission_overwrites") # TODO: Add an Overwrite object - https://discord.com/developers/docs/resources/channel#overwrite-object
self.name = self.channelData.get("name")
self.topic = self.channelData.get("topic")
self.nsfw = self.channelData.get("nsfw")
self.last_message_id = int(self.channelData.get("last_message_id"))
self.bitrate = self.channelData.get("bitrate")
self.user_limit = self.channelData.get("user_limit")
self.rate_limit_per_user = self.channelData.get("rate_limit_per_user")
self.recipients = self.channelData.get("recipients")
self.icon = self.channelData.get("icon")
self.owner_id = int(self.channelData.get("owner_id"))
self.application_id = int(self.channelData.get("application_id"))
self.parent_id = int(self.channelData.get("parent_id"))
self.last_pin_timestamp = datetime.fromisoformat(self.channelData.get("last_pin_timestamp"))
self.rtc_region = self.channelData.get("rtc_region")
self.video_quality_mode = self.channelData.get("video_quality_mode")
self.message_count = self.channelData.get("message_count")
self.member_count = self.channelData.get("member_count?")
self.member_count = self.channelData.get("member_count")
self.thread_metadate = self.channelData.get(
"thread_metadata?") # TODO: Add a Thread Metadata object - https://discord.com/developers/docs/resources/channel#thread-metadata-object
"thread_metadata") # TODO: Add a Thread Metadata object - https://discord.com/developers/docs/resources/channel#thread-metadata-object
self.member = self.channelData.get(
"member?") # TODO: Add a Thread Member object - https://discord.com/developers/docs/resources/channel#thread-member-object
self.default_auto_archive_duration = self.channelData.get("default_auto_archive_duration?")
self.permissions = self.channelData.get("permissions?")
"member") # TODO: Add a Thread Member object - https://discord.com/developers/docs/resources/channel#thread-member-object
self.default_auto_archive_duration = self.channelData.get("default_auto_archive_duration")
self.permissions = self.channelData.get("permissions")
10 changes: 5 additions & 5 deletions discordSplash/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def __init__(self, jsonData : dict):
self.memberData = jsonData

# Member data variables
self.user = user.User(self.memberData.get("user?"))
self.nick = self.memberData.get("nick?")
self.user = user.User(self.memberData.get("user"))
self.nick = self.memberData.get("nick")
self.roles = self.memberData.get("roles")
self.joined_at = datetime.fromisoformat(self.memberData.get("joined_at"))
self.premium_since = datetime.fromisoformat(self.memberData.get("premium_since?"))
self.premium_since = datetime.fromisoformat(self.memberData.get("premium_since"))
self.deaf = self.memberData.get("deaf")
self.mute = self.memberData.get("mute")
self.pending = self.memberData.get("pending?")
self.permissions = self.memberData.get("permissions?")
self.pending = self.memberData.get("pending")
self.permissions = self.memberData.get("permissions")

0 comments on commit 743548c

Please sign in to comment.