-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e827cba
commit 7290d0c
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { pickRandom } from '../../lib/func.js' | ||
import { sticker } from '../../lib/sticker.js' | ||
|
||
let handler = async (m, { conn, usedPrefix, command }) => { | ||
try { | ||
let res = await fetch(`https://raw.githubusercontent.com/clicknetcafe/Databasee/main/nsfw/${command.replace('manga2nsfw','manga').replace('nekonimensfw','nekonime')}.json`) | ||
let anu = pickRandom(await res.json()) | ||
if (!anu) throw Error('error : no url') | ||
if (anu.split('.').pop() == 'gif') { | ||
let buffer = await sticker(false, anu, packname, author) | ||
await conn.sendFile(m.chat, buffer, '', '', m) | ||
} else await conn.sendFile(m.chat, anu, '', `_Random pic : ${command}_`, m) | ||
} catch (e) { | ||
console.log(e) | ||
m.reply('scrape failed') | ||
} | ||
} | ||
|
||
handler.menunsfw = ['eba','foot','gifs','jahy','manga2nsfw','neko2','nekonimensfw','nsfwloli','nsfwmanga','nsfwneko','panties','zettai'] | ||
handler.tagsnsfw = ['randompic'] | ||
handler.command = /^(eba|foot|gifs|jahy|manga2nsfw|neko2|nekonimensfw|nsfwloli|nsfwmanga|nsfwneko|panties|zettai)$/i | ||
|
||
handler.premium = false | ||
handler.limit = true | ||
handler.nsfw = true | ||
|
||
export default handler |