srf_token }}'
                },
                body: JSON.stringify({ member: username })
            }).then(response => response.json())
            .then(data => {
                if (data.success) {
                    window.location.reload();
                } else {
                    alert(data.error);
                }
            }).catch(error => {
                console.error('Error:', error);
                alert('Failed to kick member. Please try again.');
            });
        }

     