Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- disable_web_page_preview: true,
- reply_to_message_id: ctx.message.message_id
- })
- }
- if(!ctx.message.caption)
- return ctx.replyWithVideo(video.file_id, {
- chat_id: process.env.LOG_CHANNEL,
- 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}`,
- parse_mode:'HTML'
- })
- ctx.replyWithVideo(video.file_id, {
- chat_id: process.env.LOG_CHANNEL,
- 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}`,
- parse_mode:'HTML'
- })
- }else{
- saver.saveFile(fileDetails)
- if(ctx.chat.type == 'private') {
- 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}`,{
- parse_mode: 'HTML',
- disable_web_page_preview: true,
- reply_to_message_id: ctx.message.message_id
- })
- }
- if(!ctx.message.caption)
- return ctx.replyWithVideo(video.file_id, {
- chat_id: process.env.LOG_CHANNEL,
- 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}`,
- parse_mode:'HTML'
- })
- ctx.replyWithVideo(video.file_id, {
- chat_id: process.env.LOG_CHANNEL,
- 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}`,
- parse_mode:'HTML'
- })
- }
- }
- }
- saver.saveFile(fileDetails3)
- if(ctx.chat.type == 'private') {
- let update = []
- bot.use((ctx,next)=>{
- if(ctx.message.media_group_id){
- update.push(ctx.update)
- }
- next()
- })
- Baca length saya pakai cara ini
- for (let i = 0; i < update.length; i++) {
- ctx.reply(`<b>ID grup:</b> ${ctx.message.media_group_id}\n\nhttps://t.me/${process.env.BOTUSERNAME}?start=${ctx.message.media_group_id}`,{
- parse_mode: 'HTML',
- disable_web_page_preview: true,
- reply_to_message_id: update[0].message.message_id
- })
- update = []
- }
- }
- if(!ctx.message.caption)
- return ctx.telegram.sendMediaGroup(process.env.LOG_CHANNEL,[{
- type : 'video',
- media : fileDetails3.file_id,
- 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}`,
- parse_mode:'HTML'
- }])
- ctx.telegram.sendMediaGroup(process.env.LOG_CHANNEL,[{
- type : 'video',
- media : fileDetails3.file_id,
- 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}`,
- parse_mode:'HTML'
- }])
- })
- }
- //}
- //catch(error){
- // ctx.reply(`${messagebotnoaddgroup(ctx)}`)
- //}
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement