Skip to content

Instantly share code, notes, and snippets.

@Corex24
Forked from 12Burhancv/Own*MENU*Levanter
Last active March 11, 2025 10:42
Show Gist options
  • Select an option

  • Save Corex24/6f6dd991a640446f7872bf8eda040bc0 to your computer and use it in GitHub Desktop.

Select an option

Save Corex24/6f6dd991a640446f7872bf8eda040bc0 to your computer and use it in GitHub Desktop.
Levanter own menu
//mind what you edit
//https://wa.me/2348036869669
//Created by ๐ถ๐›ฉ๐‘…๐›ฏ๐›ธ ๐›ฅ๐›ฎ๐‘‡๐›จ๐›ฉ๐›ฎ๐‘Œ#ยฉ๏ธโ„ข๏ธ๐ŸŽญ
const { bot, getBuffer, jidToNum, genThumbnail } = require('../lib/');
const { VERSION } = require('../config');
const {
textToStylist,
getUptime,
PLUGINS,
getRam,
getPlatform,
addSpace,
lang,
} = require('../lib/');
const url1 = 'https://files.catbox.moe/j9z8ii.jpeg';
const url2 = 'https://files.catbox.moe/5t92xs.jpeg';
bot(
{
pattern: 'corex ?(.*)',
desc: 'custom Menu',
type: 'misc',
},
async (message, match, ctx) => {
const jid = message.jid;
const number = message.client.user.jid;
const thumb = await getBuffer(url1);
const thumbnail = await getBuffer(url2);
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, index) => {
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 = `โ•ญโ”โ”€โ”โ”€โ”โ”€โ‰ชโœ โ‰ซโ”€โ”โ”€โ”โ”€โ”โ•ฎ
*๐ถ๐›ฉ๐‘…๐›ฏ๐›ธ ๐›ฅ๐›ฎ๐‘‡๐›จ๐›ฉ๐›ฎ๐‘Œ*
โ•ฐโ”โ”€โ”โ”€โ”โ”€โ‰ชโœ โ‰ซโ”€โ”โ”€โ”โ”€โ”โ•ฏ
โ•ญโ”โ”€โ”โ”€โ”โ”€โ‰ชโœ โ‰ซโ”€โ”โ”€โ”โ”€โ”โ•ฎ
โ”‚ ๐ŸŽญ *Prefix:* ${ctx.PREFIX}
โ”‚ ๐ŸŒ *User:* ${message.pushName}
โ”‚ ๐Ÿ“… *Date:* ${date.toLocaleDateString('en')}
โ”‚ โฐ *Time:* ${date.toLocaleTimeString()}
โ”‚ โ„๏ธ *Day:* ${date.toLocaleString('en', { weekday: 'long' })}
โ”‚ โœจ *Version:* ${VERSION}
โ”‚ ๐Ÿชป *RAM:* ${getRam()}
โ”‚ โณ *Uptime:* ${getUptime('t')}
โ”‚ ๐Ÿ‘จโ€๐Ÿ’ป *Platform:* ${getPlatform()}
โ•ฐโ”โ”€โ”โ”€โ”โ”€โ‰ชโœ โ‰ซโ”€โ”โ”€โ”โ”€โ”โ•ฏ
`;
for (let cmdType in commands) {
CMD_HELP += `โ•ญโ”โ”€โ”โ”€โ”โ”€โ‰ชโฅโ‰ซ
โ”‚ *${cmdType.toUpperCase()} โž*
โ•ฐโ”โ”€โ”โ”€โ”โ”€โ‰ชโฅโ‰ซ\n`;
commands[cmdType].forEach((cmd) => {
CMD_HELP += `โ”‚ ๐Ÿค– ${textToStylist(cmd, 'mono')}\n`;
});
}
const Data = {};
Data.linkPreview = {
renderLargerThumbnail: true,
showAdAttribution: false,
head: '๐Ÿค๐ต๐›ฉ๐‘‡ ๐ต๐‘Œ ๐ถ๐›ฉ๐‘…๐›ฏ๐›ธ ๐›ฅ๐›ฎ๐‘‡๐›ฉ๐›ฎ๐‘Œ๐Ÿ‡ณ๐Ÿ‡ฌ๐Ÿ•Š๏ธโ€ข',
body: 'ใ€† Thanks for staying with ๐ถ๐›ฉ๐‘…๐›ฏ๐›ธ ๐›ฅ๐›ฎ๐‘‡๐›จ๐›ฉ๐›ฎ๐‘Œ๐“†ฉๆ„›๐“†ช',
mediaType: 1,
thumbnail: thumb.buffer,
sourceUrl: 'https://whatsapp.com/channel/0029Vb6nHar2phHORBFhOn3p',
};
Data.quoted = {
key: {
fromMe: false,
participant: '[email protected]',
remoteJid: 'status@broadcast',
},
message: {
contactMessage: {
displayName: `${message.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),
},
},
};
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