-
-
Save SaeedX302/8d0fa9bfdffac841c3004e98fd6a5db6 to your computer and use it in GitHub Desktop.
Levanter own menu
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 } = require('../lib/'); | |
| const { VERSION } = require('../config'); | |
| const { textToStylist, getUptime, getRam } = require('../lib/'); | |
| const url1 = 'https://i.ibb.co/Fkp6Px5j/0c128bdc34a377ee07a7526d21b305bb.gif'; | |
| const url2 = 'https://i.ibb.co/MDjMZ5Yk/70575940daf4db8bd347046de0fa3372.gif'; | |
| bot( | |
| { | |
| pattern: 'nenu ?(.*)', | |
| 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; | |
| }); | |
| await Promise.all( | |
| 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 = `┌───❖ ✰ ❖───┐ | |
| │ 🌟 *BABLI🍃* 🌟 | |
| └───❖ ✰ ❖───┘ | |
| ┌───❖ 📊 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: '🔹 BABLI 🍷🤍', | |
| body: '〆 Best WhatsApp bot𓆩❤️𓆪', | |
| mediaType: 1, | |
| thumbnail: thumb.buffer, | |
| sourceUrl: 'https://v1.pinimg.com/videos/iht/hls/30/6f/5e/306f5e855f0cd89de0a3437023ea137b_720w.m3u8', | |
| }, | |
| }; | |
| const typeEmojis = { | |
| 'misc': '🎭', | |
| 'info': 'ℹ️', | |
| 'tools': '🛠️', | |
| // etc. | |
| }; | |
| 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