@@ -32,17 +32,17 @@ public function __construct($bot, $channel_id)
32
32
"channels/ {$ channel_id }" ,
33
33
"" , "GET " );
34
34
$ 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 ;
46
46
return $ this ;
47
47
}
48
48
0 commit comments