Last active
February 12, 2023 15:39
-
-
Save missnora07/d670c8ec3720b2c77b75c0388fcfde22 to your computer and use it in GitHub Desktop.
This file contains 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
// get group invite with bio | |
const { | |
getString | |
} = require('./misc/lang'); | |
const { | |
isAdmin, | |
isNumeric, | |
mentionjid | |
} = require('./misc/misc'); | |
const Lang = getString('group'); | |
const { | |
Module | |
} = require('../main') | |
Module({ | |
pattern: 'xinvite', | |
fromMe: true, | |
use: 'group', | |
desc: Lang.INVITE_DESC | |
}, (async (message, match) => { | |
if (!message.isGroup) return await message.sendReply(Lang.GROUP_COMMAND) | |
const metadata = await message.client.groupMetadata(message.jid) | |
var bio=("\n*_Description_*\n" + metadata.desc) | |
var admin = await isAdmin(message); | |
if (!admin) return await message.sendReply(Lang.NOT_ADMIN) | |
var code = await message.client.groupInviteCode(message.jid) | |
await message.client.sendMessage(message.jid, { | |
text: bio+"\n\n*=======INVITE LINK========*\nhttps://chat.whatsapp.com/" + code,detectLinks: true | |
},{detectLinks: true}) | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment