Advertisement
BimoSora

Untitled

Aug 5th, 2021
1,420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                     disable_web_page_preview: true,
  2.                                     reply_to_message_id: ctx.message.message_id
  3.                                 })
  4.                             }
  5.                             if(!ctx.message.caption)
  6.                                 return ctx.replyWithVideo(video.file_id, {
  7.                                     chat_id: process.env.LOG_CHANNEL,
  8.                                     caption: `<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Nama file:</b> ${today2(ctx)}\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  9.                                     parse_mode:'HTML'
  10.                                 })
  11.                                 ctx.replyWithVideo(video.file_id, {
  12.                                     chat_id: process.env.LOG_CHANNEL,
  13.                                     caption: `${ctx.message.caption}\n\n<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Nama file:</b> ${today2(ctx)}\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  14.                                     parse_mode:'HTML'
  15.                                 })
  16.                         }else{
  17.                             saver.saveFile(fileDetails)
  18.                             if(ctx.chat.type == 'private') {
  19.                                 ctx.reply(`<b>Nama file:</b> ${vidext}\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_unique_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,{
  20.                                     parse_mode: 'HTML',
  21.                                     disable_web_page_preview: true,
  22.                                     reply_to_message_id: ctx.message.message_id
  23.                                 })
  24.                             }
  25.                             if(!ctx.message.caption)
  26.                                 return ctx.replyWithVideo(video.file_id, {
  27.                                     chat_id: process.env.LOG_CHANNEL,
  28.                                     caption: `<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Nama file:</b> ${vidext}\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  29.                                     parse_mode:'HTML'
  30.                                 })
  31.                                 ctx.replyWithVideo(video.file_id, {
  32.                                     chat_id: process.env.LOG_CHANNEL,
  33.                                     caption: `${ctx.message.caption}\n\n<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Nama file:</b> ${vidext}\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  34.                                     parse_mode:'HTML'
  35.                                 })
  36.                             }
  37.                         }
  38.                     }
  39.                     saver.saveFile(fileDetails3)
  40.                     if(ctx.chat.type == 'private') {
  41.                     let update = []
  42.                     bot.use((ctx,next)=>{
  43.                         if(ctx.message.media_group_id){
  44.                             update.push(ctx.update)
  45.                         }
  46.                         next()
  47.                     })
  48.                     Baca length saya pakai cara ini
  49.                     for (let i = 0; i < update.length; i++) {
  50.                         ctx.reply(`<b>ID grup:</b> ${ctx.message.media_group_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${ctx.message.media_group_id}`,{
  51.                             parse_mode: 'HTML',
  52.                             disable_web_page_preview: true,
  53.                             reply_to_message_id: update[0].message.message_id
  54.                         })
  55.                         update = []
  56.                     }
  57.                        
  58.                     }
  59.                     if(!ctx.message.caption)
  60.                     return ctx.telegram.sendMediaGroup(process.env.LOG_CHANNEL,[{
  61.                         type : 'video',
  62.                         media : fileDetails3.file_id,
  63.                         caption: `<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  64.                             parse_mode:'HTML'
  65.                     }])
  66.                     ctx.telegram.sendMediaGroup(process.env.LOG_CHANNEL,[{
  67.                         type : 'video',
  68.                         media : fileDetails3.file_id,
  69.                         caption: `${ctx.message.caption}\n\n<b>Dari:</b> ${ctx.from.id}\n<b>Nama:</b> <a href="tg://openmessage?user_id=${ctx.from.id}">${first_name(ctx)} ${last_name(ctx)}</a>\n\n<b>Size:</b> ${video.file_size} B\n<b>ID file:</b> ${video.file_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${video.file_unique_id}`,
  70.                             parse_mode:'HTML'
  71.                     }])
  72.                 })
  73.             }
  74.         //}
  75.         //catch(error){
  76.         //    ctx.reply(`${messagebotnoaddgroup(ctx)}`)
  77.         //}
  78.     }
  79.  
  80. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement