Skip to content

Instantly share code, notes, and snippets.

@Sachuvichu1
Forked from Narutosermodz/mention.js
Created February 11, 2024 16:59
Show Gist options
  • Save Sachuvichu1/2e77010fb723bd33f98511be2392d60e to your computer and use it in GitHub Desktop.
Save Sachuvichu1/2e77010fb723bd33f98511be2392d60e 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://i.imgur.com/AZEO9lU.jpeg';
var audios = ["https://i.imgur.com/ijFOr74.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: "01:43 ━━━━●───── 03:50",
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