Skip to content

Instantly share code, notes, and snippets.

@arijit7899
Last active July 11, 2025 07:31
Show Gist options
  • Save arijit7899/852dcdc276e67f443e885b34c9d75fbf to your computer and use it in GitHub Desktop.
Save arijit7899/852dcdc276e67f443e885b34c9d75fbf to your computer and use it in GitHub Desktop.
const { bot, yts, song } = require('../lib/')
bot(
{
pattern: 'gandaw ?(.*)',
fromMe: true,
desc: 'Download youtube audio',
type: 'download',
},
async (message, match) => {
match = match || message.reply_message.text
if (!match) return await message.send('_Example : play ghost_')
const result = await yts(match, 0, 1, message.id)
if (!result.length) return await message.send(`*${match} not found*`)
const { title, id } = result[0]
await message.send(`⏤꯭͟͟͞͞⎯⃝❥͡🇲𝐑-🇴 𝐑𝐈 🥵💗➤⁩ 𝐃𝐨𝐰𝐧𝐥𝐨𝐚𝐝𝐢𝐧𝐠 ${title}_`)
const buffer = await song(id, message.id)
if (!buffer) return await message.send('failed!')
await message.send(buffer, { mimetype: 'audio/mpeg' }, 'audio')
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment