Spaces:
Runtime error
Runtime error
File size: 916 Bytes
69f1c1d 71edfaa 69f1c1d 71edfaa 55a717b 71edfaa 3f58228 55a717b 3f58228 55a717b 3f58228 623a28f eb3ee88 55a717b eb3ee88 55a717b eb3ee88 89c65cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# PATH: bot/ui/callbacks.py
def make(action: str, value: str = "") -> str:
return f"{action}:{value}" if value else action
def parse_cb(data: str) -> tuple[str, str]:
if ":" not in data:
return data, ""
a, b = data.split(":", 1)
return a, b
# auth actions
AUTH_JSON = "auth_json"
AUTH_CI = "auth_ci"
CANCEL = "cancel"
BACK = "back"
# main menu actions
MENU_HELP = "menu_help"
MENU_AUTH = "menu_auth"
MENU_PROFILES = "menu_profiles"
# ✅ compat: handlers.py uses MENU_SPEED, keyboards use MENU_SPEEDTEST
MENU_SPEEDTEST = "menu_speedtest"
MENU_SPEED = MENU_SPEEDTEST
# upload confirm actions
UP_GO = "up_go"
UP_EDIT = "up_edit"
UP_PRIV = "up_priv"
UP_CANCEL = "up_cancel" # used by keyboards.py
UP_DEL = UP_CANCEL # ✅ handlers.py expects UP_DEL (same meaning)
# filename selection actions (link-archive)
NAME_ORIGINAL = "n_orig"
NAME_CAPTION = "n_capt"
NAME_CUSTOM = "n_cust" |