Skip to content

Commit c73c219

Browse files
committed
Update | Beta 5.0.5
1 parent 4972d9a commit c73c219

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Model/Channel/Channel.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ public function __construct($bot, $channel_id)
3232
"channels/{$channel_id}",
3333
"", "GET");
3434
$json = json_decode($result);
35-
$this->id = $json->id;
36-
$this->last_message_id = $json->last_message_id;
37-
$this->type = $json->type;
38-
$this->name = $json->name;
39-
$this->position = $json->position;
40-
$this->parent_id = $json->parent_id;
41-
$this->topic = $json->topic;
42-
$this->guild_id = $json->guild_id;
43-
$this->nsfw = $json->nsfw;
44-
$this->permission_overwrites = $json->permission_overwrites;
45-
$this->rate_limit_per_user = $json->rate_limit_per_user;
35+
$this->id = $json->id ?? null;
36+
$this->last_message_id = $json->last_message_id ?? null;
37+
$this->type = $json->type ?? null;
38+
$this->name = $json->name ?? null;
39+
$this->position = $json->position ?? null;
40+
$this->parent_id = $json->parent_id ?? null;
41+
$this->topic = $json->topic ?? null;
42+
$this->guild_id = $json->guild_id ?? null;
43+
$this->nsfw = $json->nsfw ?? null;
44+
$this->permission_overwrites = $json->permission_overwrites ?? null;
45+
$this->rate_limit_per_user = $json->rate_limit_per_user ?? null;
4646
return $this;
4747
}
4848

0 commit comments

Comments
 (0)