JAVA SCRIPT GRENTZY <\0>
Ir al canal en Telegram
Bagi bagi case dll by @GrenTzy
Mostrar másEl país no está especificadoLa categoría no está especificada
389
Suscriptores
Sin datos24 horas
+307 días
+12330 días
Archivo de publicaciones
⌑ Follow Status : ${followStatus}
tambahin itu di info premium lu pada biar nanti ada icon status follow di bot
24 ago, 12:57
async function getFollowStatus(userId) {
const channelId = "USERNAME_CHANEL_LU";
try {
const chatMember = await bot.getChatMember(channelId, userId);
const status = chatMember.status;
if (["member", "administrator", "creator"].includes(status)) {
return "UDAH FOLLOW 😎";
} else {
return "BELUM FOLLOW BANG 😟";
}
} catch {
return "BELUM FOLLOW BANG 😟";
}
}
fungsi pengecekan user udah follow channel apa belum. Cara masangnya cukup tempel itu di bagian atas index.js lu tempat letak semua fungsi cari tempat kosong tarok itu di tempat kosong abis itu tarok pemanggilan ini const followStatus = await getFollowStatus(senderId); tarok pemanggilan itu di callback query dan di case start lu ini khusus base type bot.on text create @GrenTzy1 work kabarin
24 ago, 12:38
Base Sc CekfunctionNewV2.py.zip
cara runya di termux # Install dependency dulu pip install pyTelegramBotAPI requests sudo apt install nodejs # Jalankan python Baru.py Langkah kedua: # Update sudo apt update sudo apt install -y nodejs npm node -v npm -v versi python kalau lu gak punya panel credits @GrenTzy
21 ago, 23:41
Base cekfunc NewV2(18 agustus).zip
Sc Cekfunction New Ada 2 fitur - Cekfunction - deploy html to vercel app credits @GrenTzy buat fitur lain bebas kalau lu mau tambahin asal jangan hapus credits nya
21 ago, 23:18
case deploy.js
case deploy html ke vercel app versi bot.on text create @GrenTzy1 Udah gue try ya work intinya akun vercel app lu harus gak ada proteknya dan jangan pilih yang team tapi yang profesional work tag gua
20 ago, 07:44
mp3.py
buat conversi audio to video dan video to audio
Pertama lu tarok file py nya di folder download di folder download buat folder baru bebas namanya apa samain namanya dengan nama file di dalam folder itu contoh di dalamnya misalnya Gren.py folder nya juga Gren.py Abis itu pergi ke termux Perintah ini cd /storage/emulated/0/Download/Nama bot lu Nama bot itu nama folder yang isinya file py lu Setelah itu install module pip install ffmpeg pip install aiofiles pip install aiohttp pip install pillow Urutannya itu Credits: @GrenTzy
16 ago, 09:42
Liat dari awal ampe habis new function gue blank X Frezee chat + delay invis
14 ago, 14:01
bot.command('mp4', async (ctx) => {
try {
const chatId = ctx.chat.id;
const userId = ctx.from.id;
const reply = ctx.message.reply_to_message;
let audioFile = null;
if (reply && reply.audio) {
audioFile = reply.audio;
} else if (reply && reply.document && reply.document.mime_type && reply.document.mime_type.startsWith('audio/')) {
audioFile = reply.document;
} else if (ctx.message.audio) {
audioFile = ctx.message.audio;
} else if (ctx.message.document && ctx.message.document.mime_type && ctx.message.document.mime_type.startsWith('audio/')) {
audioFile = ctx.message.document;
}
if (!audioFile) {
await ctx.reply(
'❌ *Format salah!*\n' +
'Balas pesan audio dengan `/mp4` atau kirim audio langsung dengan caption `/mp4`.',
{ parse_mode: 'Markdown' }
);
return;
}
const fileId = audioFile.file_id;
const fileName = audioFile.file_name || 'audio.mp3';
const statusMsg = await ctx.reply('⏳ *Mengunduh audio dan membuat video dengan cover...*', { 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()}.mp3`);
const outputPath = path.join(tempDir, `output_${Date.now()}.mp4`);
const coverPath = path.join(tempDir, `cover_${Date.now()}.jpg`);
const coverUrl = 'https://files.catbox.moe/wg2jko.jpg';
const coverResponse = await axios.get(coverUrl, { responseType: 'stream' });
const coverWriter = fs.createWriteStream(coverPath);
coverResponse.data.pipe(coverWriter);
await new Promise((resolve, reject) => {
coverWriter.on('finish', resolve);
coverWriter.on('error', reject);
});
const audioResponse = await axios.get(fileUrl, { responseType: 'stream' });
const audioWriter = fs.createWriteStream(inputPath);
audioResponse.data.pipe(audioWriter);
await new Promise((resolve, reject) => {
audioWriter.on('finish', resolve);
audioWriter.on('error', reject);
});
await new Promise((resolve, reject) => {
ffmpeg()
.input(coverPath)
.loop()
.input(inputPath)
.audioCodec('aac')
.videoCodec('libx264')
.outputOptions(['-pix_fmt yuv420p', '-shortest'])
.on('end', resolve)
.on('error', reject)
.save(outputPath);
});
await ctx.replyWithVideo({ source: outputPath }, {
caption: `🤙 *Konversi berhasil!*\n📄 ${fileName.replace(/\.[^/.]+$/, '')}.mp4`,
parse_mode: 'Markdown'
});
fs.unlinkSync(inputPath);
fs.unlinkSync(outputPath);
fs.unlinkSync(coverPath);
await ctx.deleteMessage(statusMsg.message_id);
} catch (ffmpegError) {
console.warn('FFmpeg tidak tersedia atau error:', ffmpegError.message);
await ctx.replyWithDocument(fileId, {
caption: `⚠️ *Konversi tidak dilakukan (FFmpeg tidak tersedia)*\nFile dikirim sebagai dokumen mentah.`,
parse_mode: 'Markdown'
});
await ctx.deleteMessage(statusMsg.message_id);
}
} catch (error) {
console.error('Error /mp4:', error.message);
await ctx.reply(`😟Terjadi kesalahan: ${error.message}`);
}
});
Case bot.command buat konversi audio menjadi video Create @GrenTzy
14 ago, 08:33
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 ago, 08:25
