Skip to content

Instantly share code, notes, and snippets.

@missnora07
Last active February 12, 2023 15:39
Show Gist options
  • Save missnora07/d670c8ec3720b2c77b75c0388fcfde22 to your computer and use it in GitHub Desktop.
Save missnora07/d670c8ec3720b2c77b75c0388fcfde22 to your computer and use it in GitHub Desktop.
// 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