-
-
Save Anandhu000/dcef9c121105880b787bf1fb854a4c9d to your computer and use it in GitHub Desktop.
Replies random audio when mentioned sudo numbers
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
/* Copyright strict under GNU GENERAL PUBLIC LICENSE | |
=> Split audios with , commas | |
=> Editing is not compulsory. If need to change audio, then edit | |
*/ | |
const {SUDO} = require('../config'); | |
var duration = 19998000 | |
var audios = `https://i.imgur.com/5PoNdG5.mp4`, `https://i.imgur.com/Y8s8hTJ.mp4`, `https://i.imgur.com/80ZpjQV.mp4`, `https://i.imgur.com/VXOOJS5.mp4`, `https://i.imgur.com/2uxF2is.mp4`, `https://i.imgur.com/Mwhq6z1.mp4`, `https://i.imgur.com/KDQ6Vfo.mp4`, `https://i.imgur.com/67l6bS0.mp4`, `https://i.imgur.com/6xaDWNw.mp4`, `https://i.imgur.com/y5ngDMT.mp4`, `https://i.imgur.com/3WwiZQu.mp4`, `https://imgur.io/Ip6DS4W?r.mp4`, `https://i.imgur.com/7Au3VBq.mp4`, `https://i.imgur.com/DWgwz57.mp4`, `https://i.imgur.com/yPsD6ot.mp4`, `https://i.imgur.com/wCdJEFo.mp4`, `https://i.imgur.com/BgnmoSY.mp4`, `https://i.imgur.com/JYo13ds.mp4`, `https://i.imgur.com/8OWaOC3.mp4`, `https://i.imgur.com/wU3S2Qt.mp4`, `https://i.imgur.com/7FV2x6p.mp4`, `https://i.imgur.com/ebDfLZN.mp4`, `https://i.imgur.com/eHER5F0.mp4`, `https://i.imgur.com/uDpqD33.mp4`, `https://i.imgur.com/zEgIu7x.mp4`, `https://i.imgur.com/lLv3drl.mp4`, `https://i.imgur.com/xFSVKop.mp4`, `https://i.imgur.com/lYjoLvO.mp4`, `https://i.imgur.com/EqrxFrh.mp4`, `https://i.imgur.com/8qJuh8k.mp4`; | |
const {getAudioBufferFromLink,skbuffer} = require('raganork-bot') | |
const {readFileSync} = require('fs') | |
const {Module} = require('../main'); | |
// Module({pattern: 'mention ?(.*)', fromMe: true,dontAddCommandList: true}, (async (message, match) => {return;})); | |
Module({on: 'text' ,fromMe: false}, (async (message, match) => { | |
var jids = audios.split(',').filter(link => link.includes('mp4')); | |
try {var men = message.mention[0].split('@')[0]} catch {return;} | |
if (message.mention && message.mention[0] && SUDO.includes(men)) { | |
var waveform = Array.from({length: 15}, () => Math.floor(Math.random() * 100)); // use this for fancy: [0,99,0,99,0,99] | |
getAudioBufferFromLink(jids[Math.floor(Math.random()*jids.length)],async function(audio) { | |
if (audio) { | |
return message.client.sendMessage(message.jid, {audio,mimetype: 'audio/mp4',ptt: true,waveform }, { quoted: message.data })} | |
})} | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment