File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -667,7 +667,7 @@ protected function getClientStatusAttribute(): ClientStatus
667667 */
668668 protected function getIdAttribute (): string
669669 {
670- return $ this ->attributes ['id ' ] ?? $ this ->user ->id ;
670+ return $ this ->attributes ['id ' ] ?? $ this ->user ->id ?? '' ;
671671 }
672672
673673 /**
@@ -699,11 +699,16 @@ protected function getDiscriminatorAttribute(): ?string
699699 */
700700 protected function getUserAttribute (): ?User
701701 {
702+ if (isset ($ this ->attributes ['user ' ])) {
703+ return $ this ->attributePartHelper ('user ' , User::class);
704+ }
705+
702706 if ($ user = $ this ->discord ->users ->get ('id ' , $ this ->id )) {
707+ $ this ->attributes ['user ' ] = $ user ;
703708 return $ user ;
704709 }
705710
706- return $ this -> attributePartHelper ( ' user ' , User::class) ;
711+ return null ;
707712 }
708713
709714 /**
You can’t perform that action at this time.
0 commit comments