ch
Feedback
𝑽𝒊𝒏𝒛 [ 𝑰𝒏𝒇𝒐𝒓𝒎𝒂𝒕𝒊𝒐𝒏 ]

𝑽𝒊𝒏𝒛 [ 𝑰𝒏𝒇𝒐𝒓𝒎𝒂𝒕𝒊𝒐𝒏 ]

前往频道在 Telegram

Hello @Durov This channel is legal. And it doesn't contain pornographic or offensive posts. Please note! Our official channel, proudly @Telegram No spam

显示更多
1 022
订阅者
-124 小时
-37 天
-4830 天
帖子存档
Repost from N/a
case "yurl":
case "toyurl": {
    if (!isOwner) return m.reply(mess.owner);
    
    const quoted = m.quoted || m;
    const mime = quoted?.msg?.mimetype || quoted?.mimetype || null;
    
    if (!quoted || (!/image/.test(mime) && !/video/.test(mime) && !/audio/.test(mime) && !/document/.test(mime))) {
        return m.reply(`❌ Reply file/media!\n\nContoh: reply file dengan perintah ${cmd}`);
    }
    
    await sock.sendMessage(m.chat, { react: { text: '⏳', key: m.key } });
    
    try {
        const mediaBuffer = await quoted.download();
        
        const FormData = (await import('form-data')).default;
        const form = new FormData();
        form.append('file', Buffer.from(mediaBuffer), { filename: 'media.jpg' });
        
        const { data } = await axios.post('https://yurl.freedev.app/upload.php', form, {
            headers: {
                ...form.getHeaders()
            }
        });
        
        await sock.sendMessage(m.chat, { react: { text: '✅', key: m.key } });
        
        if (data.status && data.url) {
            const msg = await generateWAMessageFromContent(m.chat, {
                viewOnceMessage: {
                    message: {
                        interactiveMessage: {
                            body: {
                                text: `✅ Upload berhasil!\n\n🔗 URL: ${data.url}`
                            },
                            nativeFlowMessage: {
                                buttons: [
                                    {
                                        name: "cta_copy",
                                        buttonParamsJson: JSON.stringify({
                                            display_text: "📋 Copy URL",
                                            copy_code: data.url
                                        })
                                    }
                                ]
                            }
                        }
                    }
                }
            }, { userJid: m.sender, quoted: m });
            
            await sock.relayMessage(m.chat, msg.message, { messageId: msg.key.id });
        } else {
            await m.reply(`✅ Upload berhasil!\n\n${JSON.stringify(data, null, 2)}`);
        }
        
    } catch (error) {
        await sock.sendMessage(m.chat, { react: { text: '❌', key: m.key } });
        m.reply(`❌ Error: ${error.message}`);
    }
}
break;

Repost from Xzone catalysT
Update infos with user link
Update infos with user link

Repost from N/a
https://yurl.freedev.app api/web tourl gampang buat upload/endpointnya juga gampang