Instantly share code, notes, and snippets.
Created
September 17, 2025 02:24
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
-
Save mistershubhamkumar/b6576a8147f7d83640c24e1aa1ab9291 to your computer and use it in GitHub Desktop.
๐Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { bot, getBuffer, jidToNum, genThumbnail } = require('../lib/'); | |
| const { VERSION } = require('../config'); | |
| const { textToStylist, getUptime, getRam } = require('../lib/'); | |
| const url = 'https://files.catbox.moe/bro5sm.jpeg'; | |
| bot( | |
| { | |
| pattern: 'menu ?(.*)', | |
| desc: 'Advanced Custom Menu', | |
| type: 'settings', | |
| }, | |
| async (message, match, ctx) => { | |
| const jid = message.jid; | |
| const number = message.client.user.jid; | |
| const pushName = message.pushName || jidToNum(jid); | |
| const date = new Date(); | |
| // โ Safe thumbnail fetch | |
| const [thumb, thumbnail] = await Promise.all([getBuffer(url), getBuffer(url)]); | |
| const uptime = getUptime(); | |
| const ramUsage = getRam(); | |
| const sorted = ctx.commands.sort((a, b) => | |
| a.name && b.name ? a.name.localeCompare(b.name) : 0 | |
| ); | |
| const commands = {}; | |
| let totalCmds = 0; | |
| // โ Collect all commands | |
| ctx.commands.forEach((command) => { | |
| if (!command.dontAddCommandList && command.pattern) { | |
| let cmdType = command.type ? command.type.toLowerCase() : 'misc'; | |
| if (!commands[cmdType]) commands[cmdType] = []; | |
| let isDisabled = command.active === false; | |
| let cmd = command.name ? command.name.trim() : 'unknown'; | |
| let formattedCmd = '.' + cmd.charAt(0).toUpperCase() + cmd.slice(1); | |
| formattedCmd = textToStylist(formattedCmd, 'mono'); | |
| commands[cmdType].push(isDisabled ? `${formattedCmd} [disabled]` : formattedCmd); | |
| totalCmds++; | |
| } | |
| }); | |
| // โ Category icons | |
| const categoryIcons = { | |
| owner: '๐', | |
| bot: '๐ค', | |
| audio: '๐ต', | |
| sticker: '๐ผ๏ธ', | |
| search: '๐', | |
| downloader: 'โฌ๏ธ', | |
| group: '๐ฅ', | |
| game: '๐ฎ', | |
| fun: '๐', | |
| tools: '๐ ๏ธ', | |
| user: '๐โโ๏ธ', | |
| misc: '๐งฉ', | |
| photo: '๐ธ', | |
| text: '๐', | |
| anime: '๐', | |
| ai: '๐ง ', | |
| textmaker: 'โ๏ธ', | |
| vars: '๐', | |
| plugin: '๐', | |
| document: '๐', | |
| autoreply: '๐ค', | |
| schedule: '๐ ', | |
| personal: '๐งโโ๏ธ', | |
| budget: '๐ฐ', | |
| video: '๐ฌ', | |
| whatsapp: '๐ฑ', | |
| }; | |
| // โ Header | |
| let CMD_HELP = `*โญโโโใ๏ผณ๏ผจ๏ผต๏ผข๏ผจ๏ผก๏ผญ-๏ผธ-๏ผญ๏ผคใโโโโฎ*\n`; | |
| CMD_HELP += `*โ๐ Owner:* ๐ซ๏ผณสแดสสแดแด Sษชส๐ชพ\n`; | |
| CMD_HELP += `*โ๐ User:* ${pushName}\n`; | |
| CMD_HELP += `*โ๐ฆ Version:* ${VERSION}\n`; | |
| CMD_HELP += `*โ๐ Total Cmds:* ${totalCmds}\n`; | |
| CMD_HELP += `*โโฑ๏ธ Uptime:* ${uptime}\n`; | |
| CMD_HELP += `*โ๐ชป RAM:* ${ramUsage}\n`; | |
| CMD_HELP += `*โ๐ Date:* ${date.toLocaleDateString()}\n`; | |
| CMD_HELP += `*โ๐ Time:* ${date.toLocaleTimeString()}\n`; | |
| CMD_HELP += `*โโ๏ธ Day:* ${date.toLocaleString('en', { weekday: 'long' })}\n`; | |
| CMD_HELP += `*โฐโโโโโโโโโโโโโโโโโโโโโฏ*\n`; | |
| // โ Commands list by category | |
| for (let cmdType in commands) { | |
| const icon = categoryIcons[cmdType] || '๐'; | |
| CMD_HELP += `\n*โญโโโ ${icon} ${cmdType.toUpperCase()} โ*\n`; | |
| commands[cmdType].forEach((cmd) => { | |
| CMD_HELP += `*โโฌก ${cmd}*\n`; | |
| }); | |
| CMD_HELP += `*โโโโโโโโโโโโโโโโโโโโ*\n`; | |
| } | |
| // โ Footer (Owner info) | |
| CMD_HELP += `\n*โญโโโ[ ๐๐๐๐๐ ๐๐๐๐ ]โโโโฎ*\n`; | |
| CMD_HELP += `*โ ๐๐๐ข๐:* Sสแดสสแดแด แดแดแดแดส\n`; | |
| CMD_HELP += `*โ ๐๐ช๐ข๐๐๐ง:* +916260273863\n`; | |
| CMD_HELP += `*โ ๐๐๐๐๐ผ:* @๐๐ด๐ณ_๐ดสแดสสแดแด_แด\n`; | |
| CMD_HELP += `*โ ๐๐:* yt/shubham777k\n`; | |
| CMD_HELP += `*โ ๐Mail:* [email protected]\n`; | |
| CMD_HELP += `*โฐโโโโโโโโโโโโโโโโโโโโโโฏ*`; | |
| // โ Fix: buffer issue | |
| const Data = { | |
| linkPreview: { | |
| renderLargerThumbnail: true, | |
| showAdAttribution: true, | |
| head: 'สใฃโขแดฅโขสใฃ-๊ฑสแดสสแดแด-x-แดแด ', | |
| body: '๐ซ๏ผณสแดสสแดแด X-MD-', | |
| mediaType: 1, | |
| thumbnail: thumb.buffer, // fixed | |
| sourceUrl: 'https://instagram.com/msr_shubham_k', | |
| }, | |
| quoted: { | |
| key: { | |
| fromMe: false, | |
| participant: '[email protected]', | |
| remoteJid: 'status@broadcast', | |
| }, | |
| message: { | |
| contactMessage: { | |
| displayName: `${pushName}`, | |
| vcard: `BEGIN:VCARD\nVERSION:3.0\nN:XL;${message.client.user.name},;;;\nFN:${message.client.user.name},\nitem1.TEL;waid=${jidToNum(number)}\nitem1.X-ABLabel:WhatsApp\nEND:VCARD`, | |
| jpegThumbnail: await genThumbnail(thumbnail.buffer), // fixed | |
| }, | |
| }, | |
| }, | |
| }; | |
| return await message.send(CMD_HELP, Data); | |
| } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment