ru
Feedback

Не попадитесь на канал ботавода! Telemetrio находит и помечает такие каналы 👉 Хотите видеть метку — оформите подписку

JAVA SCRIPT GRENTZY

JAVA SCRIPT GRENTZY <\0>

Открыть в Telegram

Bagi bagi case dll by @GrenTzy

Больше
Страна не указанаКатегория не указана
389
Подписчики
Нет данных24 часа
+307 дней
+12330 дней
Архив постов
Repost from N/a
Next join mur func privat
Next join mur func privat
14 авг., 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 авг., 08:25

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

09 авг., 09:35

Inpo yg punya base lutbotz pm
09 авг., 08:33

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

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

05 авг., 08:14

Dahh gg lu yak
05 авг., 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 авг., 02:49

cek_error_pada_xml_alight_motion.html
Create @GrenTzy
03 авг., 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 авг., 20:05

photo content
+1
03 авг., 20:04

02 авг., 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 авг., 23:43

Wkwk
01 авг., 09:08

01 авг., 08:57

ngapa harus komen ya
01 авг., 08:57

baru sdr gw admin
01 авг., 08:57

oomaga
01 авг., 08:57