public function getAuthorAttribute()
    {
        if ($this->channel->type != Channel::TYPE_TEXT) {
            return $this->factory->create(User::class, $this->attributes['author'], true);
        }

        return $this->channel->guild->members->get('id', $this->attributes['author']->id);
    }
public function getAuthorAttribute()
    {
        if ($this->channel->type != Channel::TYPE_TEXT) {
            return $this->factory->create(User::class, $this->attributes['author'], true);
        }

        return $this->channel->guild->members->get('id', $this->attributes['author']->id);
    }
public function getAuthorAttribute ( ) { if ( $ this -> channel -> type != Channel :: TYPE_TEXT ) { return $ this -> factory -> create ( User :: class , $ this -> attributes [ 'author' ] , true ) ; } return $ this -> channel -> guild -> members -> get ( 'id' , $ this -> attributes [ 'author' ] -> id ) ; }
Returns the author attribute.

@return Member|User The member that sent the message. Will return a User object if it is a PM.
Returns the author attribute .