File size: 308 Bytes
69f1c1d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
# PATH: bot/ui/callbacks.py
# small + safe callback format
# example: "setdef:<profile_id>"
def set_default_cb(profile_id: str) -> str:
    return f"setdef:{profile_id}"

def parse_cb(data: str) -> tuple[str, str]:
    if ":" not in data:
        return data, ""
    a, b = data.split(":", 1)
    return a, b