themasterofficial3/sahistavaloraXbotPublic · Bot Template
AIMulti-file sharing bot that lets users start an upload session with /upload, collect photos, videos, documents, audio, stickers and animations, then package them into a shareable start-link using Bot storage. The wildcard command watches for upload-mode messages and the finish action, /start with a hash param retrieves and sends stored files, /cancel aborts sessions, and /stats tracks user and command counters. Callback handling supports help/upload buttons, and the error command logs exceptions.
Utilityfile-sharinguploaddownloadshare-linkmediainline-keyboard
7 commands0 envUpdated 23d agoCreated Aug 14, 2026
commands/_handle_callbacks.js
javascript · 47 lines
1/**#command2name: /handle_callbacks3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/*command: /handle_callbacks*/13if (update.callback_query) {14 let data = update.callback_query.data15 16 if (data === "start_upload") {17 Bot.runCommand("/upload")18 } else if (data === "show_help") {19 Bot.editMessageText(20 "📚 <b>How to Use File Share Bot</b>\n\n" +21 "🔸 <b>Step 1:</b> Click 'Start Uploading'\n" +22 "🔸 <b>Step 2:</b> Send your files (photos, videos, documents, etc.)\n" +23 "🔸 <b>Step 3:</b> Press '✅ Finish Upload' button\n" +24 "🔸 <b>Step 4:</b> Share the generated link\n\n" +25 "💡 <b>Tips:</b>\n" +26 "• You can upload multiple files in one session\n" +27 "• Files auto-delete after 10 minutes to save space\n" +28 "• Same link can be used to restore files\n" +29 "• No limits on file types or sizes\n\n" +30 "🚀 <b>Ready to start uploading?</b>",31 {32 chat_id: chat.id,33 message_id: update.callback_query.message.message_id,34 parse_mode: "HTML",35 reply_markup: {36 inline_keyboard: [[37 { text: "📤 Start Uploading", callback_data: "start_upload" }38 ]]39 }40 }41 )42 }43 44 Api.answerCallbackQuery({45 callback_query_id: update.callback_query.id46 })47}