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