מודולים ראשיים
תיעוד מפורט של המודולים הראשיים בפרויקט.
File Management
- class file_manager.BackupInfo(backup_id, user_id, created_at, file_count, total_size, backup_type, status, file_path, repo, path, metadata)[מקור]
Bases:
objectמידע על גיבוי
- פרמטרים:
- __init__(backup_id, user_id, created_at, file_count, total_size, backup_type, status, file_path, repo, path, metadata)[מקור]
- class file_manager.BackupManager[מקור]
Bases:
objectמנהל גיבויים
- __init__()[מקור]
- cleanup_expired_backups(retention_days=None, *, max_per_user=None, budget_seconds=None)[מקור]
ניקוי גיבויים ישנים ממערכת הקבצים ומ‑GridFS באופן מבוקר.
פרמטרים: - retention_days: ימים לשמירת גיבוי לפני מחיקה (ברירת מחדל: BACKUPS_RETENTION_DAYS או 30) - max_per_user: כמות מקסימלית של גיבויים לשמירה לכל משתמש (ברירת מחדל: BACKUPS_MAX_PER_USER או None) - budget_seconds: תקציב זמן לניקוי כדי לא לחסום את ה־worker (ברירת מחדל: BACKUPS_CLEANUP_BUDGET_SECONDS או 3)
החזרה: dict עם counters לסריקה/מחיקות ושגיאות.
- save_backup_bytes(data, metadata)[מקור]
שומר ZIP של גיבוי בהתאם למצב האחסון ומחזיר backup_id או None במקרה כשל.
אם storage==mongo: שומר ל-GridFS עם המטאדטה. אם storage==fs: שומר לקובץ תחת backup_dir.
- save_backup_file(file_path)[מקור]
שומר קובץ ZIP קיים לאחסון היעד (Mongo/FS) ומחזיר backup_id אם הצליח.
- list_backups(user_id)[מקור]
מחזירה רשימת קבצי ZIP ששייכים למשתמש המבקש בלבד.
כל פריט חייב להיות מסווג כשייך ל-user_id דרך אחד מהבאים: - metadata.json בתוך ה-ZIP עם שדה user_id תואם - דפוס מזהה בשם: backup_<user_id>_*
ZIPים ללא שיוך ברור למשתמש לא ייכללו כדי למנוע זליגת מידע.
- Return type:
- פרמטרים:
user_id (int)
- restore_from_backup(user_id, backup_path, overwrite=True, purge=False, extra_tags=None)[מקור]
משחזר קבצים מ-ZIP למסד הנתונים.
purge=True: מסמן את כל הקבצים הקיימים של המשתמש כלא פעילים לפני השחזור
overwrite=True: שמירה תמיד כגרסה חדשה עבור אותו שם (כברירת מחדל)
החזרה: dict עם restored_files ו-errors
- delete_backups(user_id, backup_ids)[מקור]
מוחק מספר גיבויי ZIP לפי backup_id ממערכת הקבצים ומ-GridFS (אם בשימוש).
החזרה: {”deleted“: int, ”errors“: [str, …]}
GitHub Integration
- async github_upload_fix.github_upload_new_file(update, context)[מקור]
בקשה להעלאת קובץ חדש לגיטהאב
- async github_upload_fix.handle_document_fixed(update, context)[מקור]
טיפול בקובץ שהתקבל
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async github_upload_fix.upload_to_github_fixed(update, context, status_message)[מקור]
העלאה מתוקנת לגיטהאב
- async github_upload_fix.setup_minimal_commands(application)[מקור]
מחיקת כל הפקודות והשארת רק stats למנהל
- Return type:
- פרמטרים:
application (telegram.ext.Application)
- async github_upload_fix.stats_command_secured(update, context)[מקור]
הצג סטטיסטיקות - רק לאמיר בירון
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async github_upload_fix.check_commands(update, context)[מקור]
בדיקת הפקודות הזמינות (רק לאמיר)
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
Backup System
- backup_menu_handler.emit_event(event, severity='info', **fields)[מקור]
- class backup_menu_handler.BackupMenuHandler[מקור]
Bases:
objectתפריט גיבוי ושחזור מלא + נקודות שמירה בגיט
- __init__()[מקור]
- async show_backup_menu(update, context)[מקור]
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async handle_callback_query(update, context)[מקור]
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async send_rating_prompt(update, context, backup_id)[מקור]
שולח הודעת תיוג עם 3 כפתורים עבור גיבוי מסוים.
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
backup_id (str)
Code Processing
מנהל תצוגה מקדימה של קוד Code Preview Manager
Search Engine
Repository Analysis
- repo_analyzer.emit_event(event, severity='info', **fields)[מקור]
- class repo_analyzer.RepoAnalyzer(github_token=None)[מקור]
Bases:
objectמנתח ריפוזיטורי GitHub ומציע שיפורים
- פרמטרים:
github_token (str | None)
- MAX_FILE_SIZE = 102400
- MAX_FILES = 50
- LARGE_FILE_LINES = 500
- LONG_FUNCTION_LINES = 50
- CODE_EXTENSIONS = {'.c', '.cpp', '.cs', '.go', '.java', '.js', '.jsx', '.kt', '.m', '.php', '.py', '.r', '.rb', '.rs', '.scala', '.swift', '.ts', '.tsx'}
- CONFIG_FILES = {'Cargo.toml', 'Gemfile', 'Package.swift', 'Pipfile', 'build.gradle', 'composer.json', 'go.mod', 'package.json', 'pom.xml', 'pyproject.toml', 'requirements.txt'}
- IMPORTANT_FILES = {'.dockerignore', '.github/workflows', '.gitignore', '.gitlab-ci.yml', 'Dockerfile', 'LICENSE', 'LICENSE.md', 'LICENSE.txt', 'README', 'README.md', 'README.rst', 'README.txt', 'azure-pipelines.yml', 'docker-compose.yaml', 'docker-compose.yml'}
- parse_github_url(url)[מקור]
מחלץ owner ו-repo מ-URL של GitHub
- async fetch_and_analyze_repo(repo_url)[מקור]
שולף ומנתח ריפוזיטורי מ-GitHub
Batch Processing
Large Files Handling
טיפול בקבצים גדולים עם ממשק כפתורים מתקדם Large Files Handler with Advanced Button Interface
- class large_files_handler.LargeFilesHandler[מקור]
Bases:
objectמנהל קבצים גדולים עם ממשק מתקדם
- __init__()[מקור]
- async show_large_files_menu(update, context, page=1)[מקור]
מציג תפריט קבצים גדולים עם ניווט בין עמודים
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
page (int)
- async handle_file_selection(update, context)[מקור]
טיפול בבחירת קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async view_large_file(update, context)[מקור]
הצגת קובץ גדול - תצוגה מקדימה או שליחה כקובץ
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async download_large_file(update, context)[מקור]
הורדת קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async delete_large_file_confirm(update, context)[מקור]
אישור מחיקת קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async delete_large_file(update, context)[מקור]
מחיקת קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async show_file_info(update, context)[מקור]
הצגת מידע מפורט על קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async edit_large_file(update, context)[מקור]
התחלת תהליך עריכת קובץ גדול
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
Cache Management
מנהל Cache מתקדם עם Redis Advanced Cache Manager with Redis
- class cache_manager.DynamicTTL[מקור]
Bases:
objectניהול TTL דינמי לפי סוג תוכן וקונטקסט.
הערכים כאן מייצגים TTL בסיסי בשניות עבור סוגי תוכן שכיחים.
-
BASE_TTL:
Dict[str,int] = {'bookmarks': 120, 'collections_detail': 30, 'collections_items': 180, 'collections_list': 60, 'file_content': 3600, 'file_list': 300, 'markdown_render': 1800, 'public_stats': 600, 'search_results': 180, 'settings': 60, 'sticky_summary': 60, 'tags': 300, 'user_stats': 600}
-
BASE_TTL:
- cache_manager.build_cache_key(*parts)[מקור]
בניית מפתח cache יעיל ומובנה מהחלקים הנתונים.
מסנן חלקים ריקים
ממיר לתווים בטוחים (רווחים/סלאשים)
מגביל אורך ומוסיף hash קצר במידת הצורך
- class cache_manager.CacheManager[מקור]
Bases:
objectמנהל Cache מתקדם עם Redis
- __init__()[מקור]
- enable_debug_for(seconds)[מקור]
הפעל/הארך חלון דיבאג זמני ללוגים של HIT/MISS/SET.
אם seconds <= 0: מכבה דיבאג (debug_until=0)
אחרת: מאריך (לא מקצר) את החלון כך שיסתיים לפחות בעוד seconds שניות מהעכשיו
מחזיר את timestamp החדש של debug_until.
- connect()[מקור]
התחברות ל-Redis
- set(key, value, expire_seconds=300)[מקור]
שמירת ערך ב-cache
- set_dynamic(key, value, content_type, context=None)[מקור]
שמירה ב-cache עם TTL דינמי ותיעוד מינימלי במטריקות/לוגים.
- get_with_refresh(key, refresh_func, *, content_type, context=None)[מקור]
קריאה מ-cache; אם חסר – מחשב, שומר דינמית ומחזיר.
- delete_pattern(pattern)[מקור]
מחיקת כל המפתחות שמתאימים לתבנית
- invalidate_user_cache(user_id)[מקור]
מחיקת כל ה-cache של משתמש ספציפי
- clear_all()[מקור]
ניקוי כל המטמון באופן מבוקר.
אם Redis מושבת – מחזיר 0.
אם Redis פעיל – מוחק את כל המפתחות באמצעות SCAN+DEL (best-effort).
- Return type:
- invalidate_file_related(file_id, user_id=None)[מקור]
ביטול קאש לפי קובץ: תוכן/רינדור/רשימות.
דפוסים נפוצים מעוגנים לאחור בהתאם למפתחות הקיימים בקוד.
- clear_stale(max_scan=1000, ttl_seconds_threshold=60)[מקור]
מחיקת מפתחות שכבר עומדים לפוג (”stale“) בצורה עדינה.
היגיון: - אם Redis מושבת – החזר 0. - סריקה מדורגת (SCAN) של עד max_scan מפתחות. - מחיקה רק למפתחות עם TTL חיובי קטן מ-ttl_seconds_threshold, או TTL שלילי המציין שאינו קיים. - לא מוחקים מפתחות ללא TTL (ttl == -1) כדי להימנע מפגיעה בקאש ארוך-חיים.
- cache_manager.dynamic_cache(content_type, key_prefix=None)[מקור]
דקורטור ל-caching דינמי ל-Flask endpoints.
בונה מפתח קאש יציב הכולל משתמש/נתיב/פרמטרים
שומר רק טיפוסים serializable; עבור Response עם JSON שומר את ה-data בלבד
Fail-open: לעולם לא מפיל endpoint על בעיות קאש
- cache_manager.cached(expire_seconds=300, key_prefix='default')[מקור]
דקורטור לcaching פונקציות
- cache_manager.async_cached(expire_seconds=300, key_prefix='default')[מקור]
דקורטור לcaching פונקציות async
פקודות ניהול Cache לבוט Cache Management Commands for Bot
- async cache_commands.cache_stats_command(update, context)[מקור]
הצגת סטטיסטיקות cache
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async cache_commands.clear_cache_command(update, context)[מקור]
ניקוי cache של המשתמש
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- cache_commands.setup_cache_handlers(application)[מקור]
הוספת handlers לפקודות cache
- async cache_commands.cache_warm_command(update, context)[מקור]
חימום קאש מהיר לסטטיסטיקות משתמש (/cache_warm).
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async cache_commands.debug_cache_command(update, context)[מקור]
/debug_cache <seconds> – הפעלת לוגים זמניים של HIT/MISS/SET (מנהלים בלבד).
שימוש: - /debug_cache 300 (5 דקות) - /debug_cache 0 (כיבוי)
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
User Statistics
Activity Reporting
קובץ פשוט לדיווח פעילות - העתק את הקובץ הזה לכל בוט
- activity_reporter.get_mongo_client(mongodb_uri)[מקור]
החזרת מופע MongoClient יחיד (singleton) לכל האפליקציה.
בכל קריאה מחזיר את אותו אובייקט, ויוצר רק בפעם הראשונה.
- פרמטרים:
mongodb_uri (str)
- activity_reporter.close_mongo_client()[מקור]
סגירת החיבור הגלובלי בבטחה בזמן כיבוי השירות.
- Return type:
- class activity_reporter.SimpleActivityReporter(mongodb_uri, service_id, service_name=None)[מקור]
Bases:
object- __init__(mongodb_uri, service_id, service_name=None)[מקור]
mongodb_uri: חיבור למונגו (אותו מהבוט המרכזי) service_id: מזהה השירות ב-Render service_name: שם הבוט (אופציונלי)
- report_activity(user_id)[מקור]
דיווח פעילות פשוט
- activity_reporter.create_reporter(mongodb_uri, service_id, service_name=None)[מקור]
יצירת reporter פשוט
Utilities
פונקציות עזר כלליות לבוט שומר קבצי קוד General Utility Functions for Code Keeper Bot
- class utils.CodeErrorLogger[מקור]
Bases:
objectמערכת לוגים ייעודית לשגיאות עיבוד קוד
- __init__()[מקור]
- log_code_processing_error(user_id, error_type, error_message, context=None)[מקור]
רישום שגיאות עיבוד קוד
- log_code_activity(user_id, activity_type, details=None)[מקור]
רישום פעילות עיבוד קוד
- log_validation_failure(user_id, code_length, error_reason)[מקור]
רישום כשל באימות קוד
- class utils.TimeUtils[מקור]
Bases:
objectכלים לעבודה עם זמן ותאריכים
- static format_relative_time(dt)[מקור]
פורמט זמן יחסי (לפני 5 דקות, אתמול וכו«)
- static parse_date_string(date_str)[מקור]
פרסור מחרוזת תאריך לאובייקט datetime
- class utils.TextUtils[מקור]
Bases:
objectכלים לעבודה עם טקסט
- static truncate_text(text, max_length=100, suffix='...')[מקור]
קיצור טקסט עם סיומת
- static escape_markdown(text, version=2)[מקור]
הגנה על תווים מיוחדים ב-Markdown
- static clean_filename(filename)[מקור]
ניקוי שם קובץ מתווים לא חוקיים
- static highlight_text(text, query, tag='**')[מקור]
הדגשת מילות חיפוש בטקסט
- static format_file_size(size_bytes)[מקור]
פורמט גודל קובץ (bytes -> KB/MB/GB)
- class utils.SecurityUtils[מקור]
Bases:
objectכלים אמינות ובטיחות
- static generate_secure_token(length=32)[מקור]
יצירת טוקן מאובטח
- static hash_content(content, algorithm='sha256')[מקור]
יצירת hash לתוכן
- static validate_user_input(text, max_length=10000, forbidden_patterns=None)[מקור]
בדיקת קלט משתמש
- class utils.TelegramUtils[מקור]
Bases:
objectכלים לעבודה עם Telegram
- async static send_typing_action(update, context)[מקור]
שליחת אקשן »כותב…«
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async static send_document_action(update, context)[מקור]
שליחת אקשן »שולח מסמך…«
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async static safe_answer(query, text=None, show_alert=False, cache_time=None)[מקור]
מענה בטוח ל-CallbackQuery: מתעלם משגיאות »Query is too old«/«query_id_invalid«.
- static get_user_mention(user)[מקור]
קבלת מנשן למשתמש
- Return type:
- פרמטרים:
user (telegram.User)
- static split_long_message(text, max_length=4096)[מקור]
חלוקת הודעה ארוכה לחלקים
- async static safe_edit_message_text(query, text, reply_markup=None, parse_mode=None)[מקור]
עריכת טקסט הודעה בבטיחות: מתעלם משגיאת »Message is not modified«.
תומך גם במימושי בדיקות שבהם edit_message_text היא פונקציה סינכרונית שמחזירה None (לא awaitable), וגם במימושים אסינכרוניים רגילים.
- async static safe_edit_message_reply_markup(query, reply_markup=None)[מקור]
עריכת מקלדת הודעה בבטיחות: מתעלם משגיאת »Message is not modified«.
- Return type:
- static extract_message_text_preserve_markdown(message, *, reconstruct_from_entities=True)[מקור]
שחזור טקסט ההודעה תוך ניסיון להחזיר את מה שהמשתמש התכוון מבחינת תווי Markdown.
עקרונות:
ברירת מחדל: נשתמש ב-
text/caption(התוכן הגולמי כפי שנשלח לשרת לאחר עיבוד Markdown). זאת כדי לא לשמור מחרוזת ”מרונדרת“ (למשל*_name_*), שאינה משקפת קלט משתמש.במידה ו-
reconstruct_from_entities=Trueויש ישויות עיצוב (bold/italic), ננסה לשחזר תווי Markdown שהיוו כנראה את מקור העיצוב ע“י הוספת תחיליות/סיומות סביב הטקסט שסומן. מיפוי פשוט:bold→"__",italic→"_". שאר ישויות נשמרות כפי שהן.אם יש כיתוב (caption), נשתמש במקבילות
caption_entities.
- Return type:
- פרמטרים:
message (telegram.Message)
reconstruct_from_entities (bool)
- class utils.CallbackQueryGuard[מקור]
Bases:
objectGuard גורף ללחיצות כפולות על כפתורי CallbackQuery.
מבוסס על טביעת אצבע של המשתמש/הודעה/הנתון (callback_data) כדי לחסום את אותה פעולה בחלון זמן קצר, בלי לחסום פעולות שונות.
-
DEFAULT_WINDOW_SECONDS:
float= 1.2
- static should_block(update, context, window_seconds=None)[מקור]
בודק האם יש לחסום את העדכון כלחיצה כפולה.
אם זו אותה טביעת אצבע בתוך חלון הזמן – נחסום; אחרת נסמן ונאפשר.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
window_seconds (float | None)
- async static should_block_async(update, context, window_seconds=None)[מקור]
בודק בצורה אטומית (עם נעילה) אם לחסום לחיצה כפולה של אותו משתמש.
חסימה מבוססת חלון זמן פר-משתמש ועל אותה טביעת אצבע (משתמש/צ׳אט/הודעה/הנתון), כדי למנוע כפילויות אמיתיות בלי לחסום לחיצות שונות ברצף מהיר (UX).
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
window_seconds (float | None)
-
DEFAULT_WINDOW_SECONDS:
- class utils.AsyncUtils[מקור]
Bases:
objectכלים לעבודה אסינכרונית
- class utils.PerformanceUtils[מקור]
Bases:
objectכלים למדידת ביצועים
- static timing_decorator(func)[מקור]
דקורטור למדידת זמן ביצוע
- class utils.ValidationUtils[מקור]
Bases:
objectכלים לוולידציה
- static is_valid_filename(filename)[מקור]
בדיקת תקינות שם קובץ
- class utils.FileUtils[מקור]
Bases:
objectכלים לעבודה עם קבצים
- async static download_file(url, max_size=10485760)[מקור]
הורדת קובץ מ-URL
- static get_mime_type(filename)[מקור]
קבלת MIME type של קובץ
- class utils.ConfigUtils[מקור]
Bases:
objectכלים לקונפיגורציה
- static load_json_config(file_path, default=None)[מקור]
טעינת קונפיגורציה מקובץ JSON
- class utils.CacheUtils[מקור]
Bases:
objectכלים לקאש זמני
- classmethod set(key, value, ttl=300)[מקור]
שמירה בקאש עם TTL (שניות)
- classmethod get(key, default=None)[מקור]
קבלה מהקאש
- classmethod clear()[מקור]
ניקוי כל הקאש
- utils.setup_logging(level='INFO', log_file=None)[מקור]
הגדרת לוגים
- utils.generate_summary_stats(files_data)[מקור]
יצירת סיכום סטטיסטיקות
- utils.detect_language_from_filename(filename)[מקור]
זיהוי שפת תכנות לפי סיומת הקובץ (Filename-only). נסה קודם את הדטקטור הדומייני כדי לשמור אחידות, ונפילה למיפוי מקומי לתאימות.
- utils.get_language_emoji(language)[מקור]
מחזיר אימוג’י מתאים לשפת התכנות
- class utils.SensitiveDataFilter(name='')[מקור]
Bases:
Filterמסנן שמטשטש טוקנים ונתונים רגישים בלוגים.
- utils.install_sensitive_filter()[מקור]
התקנת המסנן על כל ה-handlers הקיימים.
- utils.normalize_code(text, *, strip_bom=True, normalize_newlines=True, replace_nbsp=True, replace_all_space_separators=True, remove_zero_width=True, remove_directional_marks=True, trim_trailing_whitespace=True, remove_other_format_chars=True, remove_escaped_format_escapes=True, remove_variation_selectors=False)[מקור]
נרמול קוד לפני שמירה.
פעולות עיקריות:
הסרת BOM בתחילת הטקסט
המרת CRLF/CR ל-LF
החלפת רווחים לא-שוברים (NBSP/NNBSP) לרווח רגיל
הסרת תווי רוחב-אפס וסימוני כיוון (LRM/RLM/LRE/RLE/PDF/RLO/LRO/LRI/RLI/FSI/PDI)
הסרת תווי בקרה (Cc) פרט ל-t, n, r
הסרת רווחי סוף שורה
- Return type:
- פרמטרים:
text (str)
strip_bom (bool)
normalize_newlines (bool)
replace_nbsp (bool)
replace_all_space_separators (bool)
remove_zero_width (bool)
remove_directional_marks (bool)
trim_trailing_whitespace (bool)
remove_other_format_chars (bool)
remove_escaped_format_escapes (bool)
remove_variation_selectors (bool)
Lazy Loading
Integrations
Terminal Commands
Terminal commands: sandboxed command execution via Docker containers.
- terminal_commands.emit_event(event, severity='info', **fields)[מקור]
- async terminal_commands.run_in_sandbox(command, timeout_sec=10, max_output_chars=3500)[מקור]
Run a shell command inside a locked-down Docker container and return (rc, output).
- async terminal_commands.terminal_enter(update, context)[מקור]
Enter terminal mode if Docker is available.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_exit(update, context)[מקור]
Exit terminal mode.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_run_command(update, context)[מקור]
Run a command string inside the sandbox and send the output.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- async terminal_commands.terminal_command(update, context)[מקור]
/terminal command to enter terminal mode.
- Return type:
- פרמטרים:
update (telegram.Update)
context (telegram.ext.ContextTypes.DEFAULT_TYPE)
- terminal_commands.setup_terminal_handlers(application)[מקור]
Register terminal conversation handlers and commands (disabled on Render).
- פרמטרים:
application (telegram.ext.Application)