Referencia de funciones
Godot 4 · GDScript · Groups & clans
update_group
Edits the caller's group settings (requires the can_edit_group permission).
Asynchronous (result via signal)
Signature
update_group(fields: Dictionary) -> voidWhat it does
POSTs /groups/update. On success group = the updated projection; {} on failure. error_code may be name_taken / insufficient_rank / forbidden / not_found.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| fields | Dictionary | required | Fields to change: name (<=50), description (<=500), join_policy (open|request|invite_only|closed), max_members (1-1000). The tag is NOT editable. |
How to call it
Connect group_updated first, then call update_group(). The caller needs the can_edit_group permission (typically leader/admin). Only the keys you include are changed.
Result signal: group_updated(success: bool, group: Dictionary, error_code: String)
Example
Gamdato.group_updated.connect(_on_updated)
Gamdato.update_group({"description": "New recruits welcome", "join_policy": "open"})
func _on_updated(ok: bool, group: Dictionary, error_code: String) -> void:
if not ok: print("Failed: %s" % error_code)Use cases
- Let a leader rewrite the clan description.
- Switch a group between open and request-to-join.