uz
Feedback

Firibgarlarga uchmang! Telemetrio bunday kanallarni topadi va belgilaydi 👉 Belgini ko‘rmoqchi bo‘lsangiz, obuna bo‘ling

JAVA SCRIPT GRENTZY

JAVA SCRIPT GRENTZY <\0>

Kanalga Telegram’da o‘tish

Bagi bagi case dll by @GrenTzy

Ko'proq ko'rsatish
Mamlakat belgilanmaganToif belgilanmagan
389
Obunachilar
Ma'lumot yo'q24 soatlar
+307 kun
+12330 kun
Postlar arxiv
Repost from N/a
Next join mur func privat
Next join mur func privat
14 Avg, 08:29

bot.command('mp3', async (ctx) => {
    try {
        const chatId = ctx.chat.id;
        const userId = ctx.from.id;
        const reply = ctx.message.reply_to_message;
        let videoFile = null;

        if (reply && reply.video) {
            videoFile = reply.video;
        } else if (reply && reply.document && reply.document.mime_type && reply.document.mime_type.startsWith('video/')) {
            videoFile = reply.document;
        } else if (ctx.message.video) {
            videoFile = ctx.message.video;
        } else if (ctx.message.document && ctx.message.document.mime_type && ctx.message.document.mime_type.startsWith('video/')) {
            videoFile = ctx.message.document;
        }

        if (!videoFile) {
            await ctx.reply(
                '😮‍💨 *Format salah!*\n' +
                'Balas pesan video dengan `/mp3` atau kirim video langsung dengan caption `/mp3`.',
                { parse_mode: 'Markdown' }
            );
            return;
        }
        const fileId = videoFile.file_id;
        const fileName = videoFile.file_name || 'video.mp4';
        const statusMsg = await ctx.reply('⏳ *Mengunduh video dan mengonversi ke MP3...*', { parse_mode: 'Markdown' });
        const file = await ctx.telegram.getFile(fileId);
        const fileUrl = `https://api.telegram.org/file/bot${BOT_TOKEN}/${file.file_path}`;
        try {
            const ffmpeg = require('fluent-ffmpeg');
            const os = require('os');
            const tempDir = os.tmpdir();
            const inputPath = path.join(tempDir, `input_${Date.now()}.mp4`);
            const outputPath = path.join(tempDir, `output_${Date.now()}.mp3`);
            const response = await axios.get(fileUrl, { responseType: 'stream' });
            const writer = fs.createWriteStream(inputPath);
            response.data.pipe(writer);

            await new Promise((resolve, reject) => {
                writer.on('finish', resolve);
                writer.on('error', reject);
            });
            await new Promise((resolve, reject) => {
                ffmpeg(inputPath)
                    .toFormat('mp3')
                    .on('end', resolve)
                    .on('error', reject)
                    .save(outputPath);
            });
            await ctx.replyWithAudio({ source: outputPath }, {
                caption: `😎 *Konversi berhasil!*\n📄 ${fileName.replace(/\.[^/.]+$/, '')}.mp3`,
                parse_mode: 'Markdown'
            });
            fs.unlinkSync(inputPath);
            fs.unlinkSync(outputPath);

            await ctx.deleteMessage(statusMsg.message_id);

        } catch (ffmpegError) {
            console.warn('FFmpeg tidak tersedia atau error:', ffmpegError.message);
            await ctx.replyWithAudio(fileId, {
                caption: `⚠️ *Konversi tidak dilakukan (FFmpeg tidak tersedia)*\nFile dikirim sebagai audio mentah.`,
                parse_mode: 'Markdown'
            });
            await ctx.deleteMessage(statusMsg.message_id);
        }

    } catch (error) {
        console.error('Error /mp3:', error.message);
        await ctx.reply(`Erorr bang😮‍💨: ${error.message}`);
    }
});
Case bot.command buat konversi video menjadi audio Create @GrenTzy
14 Avg, 08:25

https://t.me/+OnVSogIFjfU0ZmM1 Gb panel free cuy yg mau join
14 Avg, 07:55

09 Avg, 09:35

Inpo yg punya base lutbotz pm
09 Avg, 08:33

https://t.me/NamzOfficiel 250p gas shere jailbreak depseek
06 Avg, 07:15

NEW BOT BUILD APP
Fitur :
• Build App
• Build Web
• Rineme All
• Add Function
• Ubah Warna
• Dll
Bot : @ryuubuildapp_bot
06 Avg, 00:06

05 Avg, 08:14

Dahh gg lu yak
05 Avg, 02:56

https://khususbanding749-ai.github.io/WebGrenTzy/ Yang mau web putar lagu dan video nih
https://khususbanding749-ai.github.io/WebGrenTzy/ Yang mau web putar lagu dan video nih
05 Avg, 02:49

cek_error_pada_xml_alight_motion.html
Create @GrenTzy
03 Avg, 20:16

Ada yang mau gak nih ? Btw yang suka ngedit pake am ini berguna banget menurut gue jadi kalian bisa cek apakah xml itu ada eror atau gaknya
03 Avg, 20:05

photo content
+1
03 Avg, 20:04

02 Avg, 05:38

Kadang heran sama orang, siap dibantu bukan nya makasih malah ngatain, otak nya dimana? Mana hasil kita ditunjukin ke orang dan dibilang hasil dia sendiri... Otak nya itu loh, ntah kurang didikan orang tua atau gak ada orang tua 🤦‍♂🤦‍♂
01 Avg, 23:43

Wkwk
01 Avg, 09:08

01 Avg, 08:57

ngapa harus komen ya
01 Avg, 08:57

baru sdr gw admin
01 Avg, 08:57

oomaga
01 Avg, 08:57