ashlynn/TBHFileSharingBotPublic · Bot Template
Share files quickly and securely with @TBHFileSharingBot. Send files up to 4 GB and receive instant sharing links for Telegram or direct sharing. With secure encryption, inline mode, and a simple workflow, sharing files from any Telegram chat is fast and effortless.
Utilityfile-sharinginline-modetelegram-linkschannel-storagedocumentsvideos
11 commands0 envUpdated 2d agoCreated Sep 26, 2025
commands/_start.js
javascript · 67 lines
1/**#command2name: /start3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12 13if (params) {14 try {15 const messageId = deHashText(params);16 17 let editResult = await Api.editMessageCaption({18 chat_id: BOT_CHANNEL,19 message_id: messageId,20 caption: generateUUID()21 });22 23 if (editResult.ok) {24 const data = editResult.result;25 let fileId;26 27 if (data.document) {28 fileId = data.document.file_id;29 Api.sendDocument({ document: fileId });30 } else if (data.audio) {31 fileId = data.audio.file_id;32 Api.sendDocument({ document: fileId });33 } else if (data.video) {34 fileId = data.video.file_id;35 Api.sendDocument({ document: fileId });36 } else if (data.photo) {37 fileId = data.photo[data.photo.length - 1].file_id;38 Api.sendPhoto({ photo: fileId });39 } else {40 Bot.sendMessage("File not found or invalid format.");41 }42 } else {43 Bot.sendMessage("File not found or access denied.");44 }45 } catch (error) {46 Bot.sendMessage("Invalid file hash provided.");47 }48 return; 49}50 51const welcomeText = `*Welcome to File Share Bot!*52 53Send me any file and I'll generate sharing links for you.54 55*Supported formats:*56- Documents (PDF, DOC, etc.)57- Videos (MP4, AVI, etc.) 58- Audio files (MP3, WAV, etc.)59- Images (JPG, PNG, etc.)60 61*Commands:*62/help - Show help information63/about - About this bot64 65Just send me a file to get started!`;66 67Bot.sendMessage(welcomeText);