Skip to content

Instantly share code, notes, and snippets.

@ADK-RICHU
Forked from mask-sir/Sanime.js
Last active September 8, 2023 03:30
Show Gist options
  • Select an option

  • Save ADK-RICHU/6c071ab2deda6b31a744b172941282f1 to your computer and use it in GitHub Desktop.

Select an option

Save ADK-RICHU/6c071ab2deda6b31a744b172941282f1 to your computer and use it in GitHub Desktop.
const {Function,isPublic, getJson, getBuffer,prefix} = require("../lib/");
Function({pattern: 'sanime ?(.*)', fromMe: isPublic, desc: 'random anime status videos', type: 'anime'}, async (m, text, client) => {
let { result} = await getJson ('https://raw.githubusercontent.com/mask-sir/api.mask-ser/main/AnimeVideos.json')
let mask = result[Math.floor(Math.random()*result.length)]
const buttons = [
{buttonId: prefix + 'sanime', buttonText: {displayText: 'next'}, type: 1}]
const buttonMessage = {
video: {url: mask},
caption: "*Random anime videos*",
footer: '© ᴀᴅᴋ ʀᴉᴄⲏᴜ ᴘᴜʙᴌᴉᴄ ʙᴏᴛ',
buttons: buttons,
headerType: 4
}
client.sendMessage(m.jid, buttonMessage)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment