Skip to content

Instantly share code, notes, and snippets.

@mistershubhamkumar
Forked from Rdx690/Own*MENU*Levanter
Last active June 4, 2025 13:49
Show Gist options
  • Select an option

  • Save mistershubhamkumar/81e298aee0f40084fee7f4c5a6799e85 to your computer and use it in GitHub Desktop.

Select an option

Save mistershubhamkumar/81e298aee0f40084fee7f4c5a6799e85 to your computer and use it in GitHub Desktop.
Levanter own menu
const { bot, getBuffer, jidToNum } = require('../lib/');
const { VERSION } = require('../config');
const { textToStylist, getUptime, getRam } = require('../lib/');
const url1 = 'https://files.catbox.moe/hge3i8.jpeg';
const url2 = 'https://files.catbox.moe/e6phie.jpeg';
bot(
{
pattern: 'menu ?(.*)',
desc: 'Custom Stylish Menu',
type: 'misc',
},
async (message, match, ctx) => {
const number = message.client.user.jid;
const thumb = await getBuffer(url1);
const date = new Date();
const sorted = ctx.commands.sort((a, b) => {
if (a.name && b.name) {
return a.name.localeCompare(b.name);
}
return 0;
});
const commands = {};
ctx.commands.map(async (command) => {
if (command.dontAddCommandList === false && command.pattern !== undefined) {
let cmdType = command.type.toLowerCase();
if (!commands[cmdType]) commands[cmdType] = [];
let isDisabled = command.active === false;
let cmd = command.name.trim();
commands[cmdType].push(isDisabled ? cmd + ' [disabled]' : cmd);
}
});
let CMD_HELP = `┌───❖ ✰ ❖───┐
│ 🌟 *S͟𝚮͟𝐔͟𝚩͟𝚮͟𝚫͟𝚳͟🍃* 🌟
└───❖ ✰ ❖───┘
┌───❖ 📊 INFO ❖───┐
│ 📅 *Date:* ${date.toLocaleDateString('en')}
│ ⏰ *Time:* ${date.toLocaleTimeString()}
│ ❄️ *Day:* ${date.toLocaleString('en', { weekday: 'long' })}
│ ✨ *Version:* ${VERSION}
│ 🪻 *RAM:* ${getRam()}
│ ⏳ *Uptime:* ${getUptime('t')}
└───❖ ✰ ❖───┘\n\n`;
for (let cmdType in commands) {
CMD_HELP += `⟡───★ *${cmdType.toUpperCase()} COMMANDS* ★───⟡\n`;
commands[cmdType].forEach((cmd) => {
CMD_HELP += ` ☠️ ${textToStylist(cmd, 'mono')}\n`;
});
CMD_HELP += `⟡──────────────────────⟡\n\n`;
}
const Data = {
linkPreview: {
renderLargerThumbnail: true,
showAdAttribution: false,
head: '🔹 𝑺͟𝜢͟𝑼͟𝜝͟𝜢͟𝜟͟𝜧͟ 🍷🤍',
body: '〆 Best WhatsApp bot𓆩❤️𓆪',
mediaType: 1,
thumbnail: thumb.buffer,
sourceUrl: 'https://files.catbox.moe/ewmr35.jpeg',
},
};
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