Spaces:
Paused
Paused
Download src/plugin/ebinary.js from arabdullah/ethix-md-user: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/spaces/arabdullah/ethix-md-user/resolve/main/src/plugin/ebinary.js
- Command line
-
hf download hf://spaces/arabdullah/ethix-md-user/src/plugin/ebinary.js
-
curl -L -o ebinary.js https://huggingface.co/spaces/arabdullah/ethix-md-user/resolve/main/src/plugin/ebinary.js
569 Bytes
| import { eBinary } from '../../lib/binary.cjs'; | |
| import config from '../../config.cjs'; | |
| const ebinary = async (m, gss) => { | |
| 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(); | |
| const validCommands = ['ebinary']; | |
| if (validCommands.includes(cmd)) { | |
| if (!text) return m.reply('Please provide a question.'); | |
| let db = await eBinary(text) | |
| m.reply(db) | |
| } | |
| }; | |
| export default ebinary; |