Skip to content

Commit 113af71

Browse files
authored
Enhance info-script with waifu image fetching
Updated the info-script to include fetch functionality and random waifu image retrieval.
1 parent 458cac6 commit 113af71

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

plugins/info-script.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
var handler = async(m, { conn }) => {
1+
//Credits Jangan Dihapus
2+
//Thanks To Papah-Chan
3+
import fetch from 'node-fetch'
4+
var handler = async(m, { conn, text, usedPrefix, command }) => {
25

3-
let str = `*https://github.com/ImYanXiao/Elaina-MultiDevice*`
4-
let letoy = hwaifu.getRandom()
5-
return conn.reply(m.chat, str, fakes, { externalAdReply : { title: 'ᴡᴀɴᴛ sᴏᴜʀᴄᴇ ᴄᴏᴅᴇ ᴛʜɪs ʙᴏᴛ?',mediaType: 1, renderLargeThumbnail: true, thumbnail: await getBuffer(letoy), socialUrl: social}})
6-
}
7-
handler.help = ['source code']
8-
handler.tags = ['info']
6+
let str = `*https://github.com/ImYanXiao/Elaina-MultiDevice*`
7+
let waifu = await fetch('https://raw.githubusercontent.com/ArugaZ/grabbed-results/main/random/anime/waifu.txt')
8+
let chen = await waifu.text()
9+
let ran = chen.split('\n')
10+
let yae = ran[Math.floor(Math.random() * ran.length)]
11+
let thumb = await(await fetch(yae)).buffer()
12+
await conn.reply(m.chat, str, m, global.fakeig)
13+
}
14+
handler.help = ['sc', 'script']
15+
handler.tags = ['info', 'main']
916
handler.command = /^(script|sc)$/i
1017

1118
export default handler

0 commit comments

Comments
 (0)