YouTubeLoader / bot /ui /callbacks.py
understanding's picture
Update bot/ui/callbacks.py
eb3ee88 verified
raw
history blame contribute delete
916 Bytes
# 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"