Spaces:
Paused
Paused
Download src/plugin/owner.js from arabdullah/ethix-md-user: direct link, hf CLI and curl.
- Browser
- Download file 710 Bytes
-
https://huggingface.co/spaces/arabdullah/ethix-md-user/resolve/main/src/plugin/owner.js
- Command line
-
hf download hf://spaces/arabdullah/ethix-md-user/src/plugin/owner.js
-
curl -L -o owner.js https://huggingface.co/spaces/arabdullah/ethix-md-user/resolve/main/src/plugin/owner.js
710 Bytes
| import config from '../../config.cjs'; | |
| const ownerContact = async (m, gss) => { | |
| const ownernumber = config.OWNER_NUMBER; | |
| const prefix = config.PREFIX; | |
| const cmd = m.body.startsWith(prefix) ? m.body.slice(prefix.length).split(' ')[0].toLowerCase() : ''; | |
| const text = m.body.slice(prefix.length + cmd.length).trim(); | |
| if (cmd === 'owner') { | |
| try { | |
| await gss.sendContact(m.from, [ownernumber], m); | |
| await m.React("✅"); | |
| } catch (error) { | |
| console.error('Error sending owner contact:', error); | |
| m.reply('Error sending owner contact.'); | |
| await m.React("❌"); | |
| } | |
| } | |
| }; | |
| export default ownerContact; | |