X-SPYDER Projects
Закрытый канал
Informasi Tentang Project X-SPYDER Semua ada di channel Ini
БольшеСтрана не указанаКатегория не указана
880
Подписчики
Нет данных24 часа
+107 дней
+6230 дней
Архив постов
bot.onText(/^\/spotify(?:\s+(.*))?/, async (msg, match) => {
const chatId = msg.chat.id;
const input = match[1];
if (!input) {
return bot.sendMessage(chatId, "⚠️ Masukkan judul atau link Spotify!\n\nContoh:\n/spotify Life Goes On\n/spotify https://open.spotify.com/track/xxxx");
}
try {
await bot.sendMessage(chatId, "🔍 Sedang memproses Spotify...");
const res = await axios.get("https://api.ikyyxd.my.id/search/spotifyplay", {
params: { query: input }
});
if (res.data.status !== true) {
return bot.sendMessage(chatId, "❌ Lagu tidak ditemukan");
}
const result = res.data.result;
const { title, artist, album, duration, url: link, thumbnail: image, download: audioUrl } = result;
const caption = `🎧 *Spotify Player*\n\n📌 *Title* : ${title}\n👤 *Artist* : ${artist}\n💿 *Album* : ${album}\n⏱ *Duration* : ${duration}\n\n🔗 *Spotify* :\n${link}`;
await bot.sendPhoto(chatId, image, {
caption: caption,
parse_mode: "Markdown"
});
const audioBuffer = await axios.get(audioUrl, {
responseType: "arraybuffer",
headers: { "User-Agent": "Mozilla/5.0" }
});
if (audioBuffer.data.length > 30 * 1024 * 1024) {
return bot.sendMessage(chatId, "⚠️ Audio terlalu besar, coba lagu lain!");
}
await bot.sendAudio(chatId, Buffer.from(audioBuffer.data), {
title: title,
performer: artist
}, {
filename: `${title}.mp3`,
contentType: 'audio/mpeg'
});
} catch (err) {
console.error(err.message);
try {
const res = await axios.get("https://ikyyzyyrestapi.my.id/search/spotifyplay", {
params: { query: input }
});
const result = res.data.result;
const audioBuffer = await axios.get(result.download, {
responseType: "arraybuffer"
});
await bot.sendAudio(chatId, Buffer.from(audioBuffer.data), {
title: result.title,
performer: result.artist
});
} catch (finalErr) {
bot.sendMessage(chatId, "❌ Terjadi error saat mengambil lagu Spotify");
}
}
});bot.command('anime', async (ctx) => {
try {
await ctx.reply("🔍 Sedang mendownload foto...");
const response = await axios({
method: 'get',
url: "https://api.ikyyxd.my.id/random/animehot",
responseType: 'arraybuffer',
headers: {
'User-Agent': 'Mozilla/5.0'
}
});
const imageData = Buffer.from(response.data);
await ctx.replyWithPhoto(
{ source: imageData },
{
caption: "*Rendom Anime*",
parse_mode: "Markdown"
}
);
} catch (err) {
console.error("Error Download/Send Photo:", err.message);
ctx.reply("❌ Gagal mendownload atau mengirim foto.");
}
});
Simple Rendom Anime
bot.onText(/^\/rasuk (.+)/, async (msg, match) => {
const msgId = msg.from.id;
const input = match[1].split(",");
const token = input[0];
const chatId = input[1];
const text = input.slice(2).join(",");
if (!token || !chatId)
return bot.sendMessage(
msg.chat.id,
"❌ Format:\n/rasuk <token>,<chat_id>,<pesan>\nAtau reply media"
);
const targetBot = new TelegramBot(token, { polling: false });
try {
if (msg.reply_to_message) {
const r = msg.reply_to_message;
if (r.text) {
await targetBot.sendMessage(chatId, r.text);
}
else if (r.photo) {
await targetBot.sendPhoto(
chatId,
r.photo.at(-1).file_id,
{ caption: r.caption || "" }
);
}
else if (r.video) {
await targetBot.sendVideo(
chatId,
r.video.file_id,
{ caption: r.caption || "" }
);
}
else if (r.document) {
await targetBot.sendDocument(
chatId,
r.document.file_id,
{ caption: r.caption || "" }
);
}
else if (r.audio) {
await targetBot.sendAudio(
chatId,
r.audio.file_id,
{ caption: r.caption || "" }
);
}
else if (r.voice) {
await targetBot.sendVoice(chatId, r.voice.file_id);
}
else if (r.sticker) {
await targetBot.sendSticker(chatId, r.sticker.file_id);
}
else if (r.animation) {
await targetBot.sendAnimation(
chatId,
r.animation.file_id,
{ caption: r.caption || "" }
);
}
else {
return bot.sendMessage(
msg.chat.id,
"❌ Jenis media belum didukung"
);
}
}
else {
if (!text) return bot.sendMessage(msg.chat.id, "❌ Pesan kosong");
await targetBot.sendMessage(chatId, text);
}
bot.sendMessage(msg.chat.id, "✅ RASUK berhasil");
} catch (err) {
bot.sendMessage(
msg.chat.id,
"❌ Gagal\n" + err.message
);
}
});