Created
March 21, 2025 10:39
-
-
Save KOULIKS94/63f9241dce3b49180c2b9f9c3ff15013 to your computer and use it in GitHub Desktop.
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 handler = async (m, { conn, text, participants }) => { | |
| if (!m.isGroup) return m.reply('β *This command can only be used in groups.*'); | |
| // Check if the bot is admin | |
| const botNumber = conn.user.jid; | |
| const groupMetadata = await conn.groupMetadata(m.chat); | |
| const botIsAdmin = groupMetadata.participants.find(p => p.id === botNumber)?.admin; | |
| if (!botIsAdmin) return m.reply('β *I need to be an admin to tag everyone.*'); | |
| // Message customization | |
| let msg = text || 'π₯ *Arise, warriors!* π'; | |
| let symbols = ['π₯', 'β‘', 'β¨', 'π', 'π', 'π', 'π―', 'π₯']; | |
| let spacing = ''; | |
| let mentions = participants.map((user, i) => { | |
| let icon = symbols[i % symbols.length]; | |
| let tag = `@${user.id.split('@')[0]}`; | |
| spacing += ' '; // Creates the rising effect | |
| return `${spacing}${icon} ${tag}`; | |
| }).join('\n'); | |
| let caption = `π *Rise of the Legends!*\nβββββββββββββββ\n${msg}\nβββββββββββββββ\n${mentions}\nβββββββββββββββ`; | |
| await conn.sendMessage(m.chat, { text: caption, mentions: participants.map(user => user.id) }); | |
| }; | |
| handler.command = ['arise']; | |
| handler.tags = ['group']; | |
| handler.help = ['arise']; | |
| handler.group = true; | |
| handler.admin = false; | |
| handler.botAdmin = true; | |
| export default handler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment