Handlers
תיעוד של כל ה-handlers בפרויקט.
File View Handler
File View Handler Module
מודול לניהול תצוגת קבצים וקוד בבוט טלגרם.
מודול זה מספק פונקציונליות ל: - הצגת קבצי קוד - עריכת קבצים - ניהול גרסאות - ייצוא קבצים
- async handlers.file_view.handle_file_menu(update, context)[מקור]
מציג תפריט פעולות עבור קובץ נבחר.
- פרמטרים:
update – אובייקט Update מטלגרם
context (
DEFAULT_TYPE
) – הקונטקסט של השיחה
- Returns:
מצב השיחה החדש
- Return type:
הערה
מציג אפשרויות כמו הצגה, עריכה, מחיקה ושיתוף
- async handlers.file_view.handle_view_file(update, context)[מקור]
Display file content with actions (edit, history, download).
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_code(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.receive_new_code(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_name(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_note(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.receive_new_name(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_versions_history(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_download_file(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_delete_confirmation(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_delete_file(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_file_info(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_view_direct_file(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_code_direct(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_name_direct(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_edit_note_direct(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.file_view.handle_clone(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
Pagination Handler
- handlers.pagination.build_pagination_row(page, total_items, page_size, callback_prefix)[מקור]
Return a row of pagination buttons [prev,next] or None if not needed. :rtype:
Optional
[List
[InlineKeyboardButton
]]page: current 1-based page index
total_items: total number of items
page_size: items per page
callback_prefix: for example
files\_page\_
→ formats as{prefix}{page_num}
Save Flow Handler
- async handlers.save_flow.long_collect_timeout_job(context)[מקור]
קריאת טיימאאוט: מסכם ומתקדם לפי חלקים שנאספו.
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.start_save_flow(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.start_add_code_menu(update, context)[מקור]
תפריט בחירת מצב הוספת קוד: רגיל או איסוף ארוך
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.start_long_collect(update, context)[מקור]
כניסה למצב איסוף קוד ארוך
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.long_collect_receive(update, context)[מקור]
קבלת חלק קוד נוסף במצב איסוף
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.long_collect_done(update, context)[מקור]
סיום איסוף, איחוד ושילוב לזרימת שמירה רגילה
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.get_code(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.get_filename(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.get_note(update, context)[מקור]
- Return type:
- פרמטרים:
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handlers.save_flow.save_file_final(update, context, filename, user_id)[מקור]