Spaces:
Paused
Paused
Download plugins/gpp.js from levantermd/lyfe1: direct link, hf CLI and curl.
- Browser
- Download file 760 Bytes
-
https://huggingface.co/spaces/levantermd/lyfe1/resolve/main/plugins/gpp.js
- Command line
-
hf download hf://spaces/levantermd/lyfe1/plugins/gpp.js
-
curl -L -o gpp.js https://huggingface.co/spaces/levantermd/lyfe1/resolve/main/plugins/gpp.js
760 Bytes
| const { bot, isAdmin } = require('../lib/') | |
| bot( | |
| { | |
| pattern: 'gpp ?(.*)', | |
| desc: 'change group icon', | |
| type: 'group', | |
| onlyGroup: true, | |
| }, | |
| async (message, match) => { | |
| const isRestrict = await message.groupMetadata(message.jid, 'restrict') | |
| if (isRestrict) { | |
| const participants = await message.groupMetadata(message.jid) | |
| const isImAdmin = await isAdmin(participants, message.client.user.jid) | |
| if (!isImAdmin) return await message.send(`_I'm not admin._`) | |
| } | |
| if (!message.reply_message || !message.reply_message.image) | |
| return await message.send('*Reply to a image.*') | |
| await message.updateProfilePicture( | |
| await message.reply_message.downloadMediaMessage(), | |
| message.jid | |
| ) | |
| return await message.send('_Group icon Updated_') | |
| } | |
| ) | |