Skip to content

Instantly share code, notes, and snippets.

@Narutosermodz
Forked from Loki-Xer/mention.js
Last active October 20, 2024 14:49
Show Gist options
  • Save Narutosermodz/1d3496f0cf1506fda3c7f6c7abf089c5 to your computer and use it in GitHub Desktop.
Save Narutosermodz/1d3496f0cf1506fda3c7f6c7abf089c5 to your computer and use it in GitHub Desktop.
MADE FOR JARVIS MD MENTION ❤
/*------------------------------------------------------------------------------------------------------------------------------------------------------
Copyright (C) 2023 Loki - Xer.
Licensed under the GPL-3.0 License;
you may not use this file except in compliance with the License.
Jarvis - Loki-Xer
------------------------------------------------------------------------------------------------------------------------------------------------------*/
const { System, getBuffer, toAudio, } = require("../lib/");
const logo = 'https://cdn.ironman.my.id/i/iljbrm.jpeg';
var audios = ["https://cdn.ironman.my.id/i/pxjiut.mp4"];
System({ pattern: "mnew", on: "all", allowBot: true, fromMe: 'public', desc: "mention audio", }, async (message, match) => {
const audio = audios[Math.floor(Math.random() * audios.length)]
const Audio = await getBuffer(audio)
const image2 = await getBuffer(logo)
try {
var res = await toAudio(Audio, 'mp4')
} catch (b) {
return await message.client.sendMessage(message.client.user.id, {
text: `Error on parsing audio \n ${b}\n\n${audio}\n\ndelete this url from audio list`
})
}
if(!message.mention.isOwner) return;
try {
return await message.client.sendMessage(message.jid, {
audio: res,
mimetype: 'audio/mpeg',
ptt: true,
waveform: [00,99,00,99,00,99,00],
contextInfo: {
externalAdReply: {
title: "ɴᴀʀᴜᴛᴏ ʜᴇʀᴇ",
body: "",
renderLargerThumbnail: false, // use true for larger thumbnail
thumbnail: image2,
mediaType: 1,
mediaUrl: '',
sourceUrl: "https://www.instagram.com/naruto__ser_._?igsh=MWJtaHY3ZjJ6a3ZnZQ==",
showAdAttribution: true,
}
},
}, { quoted:message });
} catch (e) {
return await message.send(e);
}
});
// mention audio for Jarvis-md
// credit : @Loki-Xer
// Thanks to @inrl-official
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment