Справочник функций
Godot 4 · GDScript · Groups & clans
cancel_group_request
Withdraws the caller's own pending join request.
Asynchronous (result via signal)
Signature
cancel_group_request(request_id: String) -> voidWhat it does
POSTs /groups/requests/cancel. This is the requester retracting their own application. error_code may be not_pending / not_found.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| request_id | String | required | Id of the caller's own pending request to withdraw. |
How to call it
Connect group_request_cancelled first, then call cancel_group_request(). Only the requester may cancel; get ids from list_group_requests("outgoing").
Result signal: group_request_cancelled(success: bool, error_code: String)
Example
Gamdato.group_request_cancelled.connect(_on_req_cancel)
Gamdato.cancel_group_request(request_id)
func _on_req_cancel(ok: bool, error_code: String) -> void:
if ok: print("Request withdrawn")
else: print("Failed: %s" % error_code)Use cases
- Let a player retract an application they no longer want.
- Cancel a pending request before joining a different group.