public function getMentionRolesAttribute()
    {
        $roles = new Collection([], 'id');

        foreach ($this->channel->guild->roles as $role) {
            if (array_search($role->id, $this->attributes['mention_roles']) !== false) {
                $roles->push($role);
            }
        }

        return $roles;
    }
public function getMentionRolesAttribute()
    {
        $roles = new Collection([], 'id');

        foreach ($this->channel->guild->roles as $role) {
            if (array_search($role->id, $this->attributes['mention_roles']) !== false) {
                $roles->push($role);
            }
        }

        return $roles;
    }
public function getMentionRolesAttribute ( ) { $ roles = new Collection ( [ ] , 'id' ) ; foreach ( $ this -> channel -> guild -> roles as $ role ) { if ( array_search ( $ role -> id , $ this -> attributes [ 'mention_roles' ] ) !== false ) { $ roles -> push ( $ role ) ; } } return $ roles ; }
Returns the mention_roles attribute.

@return Collection The roles that were mentioned.
Returns the mention_roles attribute .