Skip to content

Instantly share code, notes, and snippets.

@S-U-P-E-R-I-O-R
Forked from zailio/status.sender.js
Last active October 27, 2023 17:00
Show Gist options
  • Select an option

  • Save S-U-P-E-R-I-O-R/85452ded09129f34156674202ef5a044 to your computer and use it in GitHub Desktop.

Select an option

Save S-U-P-E-R-I-O-R/85452ded09129f34156674202ef5a044 to your computer and use it in GitHub Desktop.
const {
inrl
} = require("../lib");
inrl({
pattern: 'give_me_your_status',
on: "all",
fromMe: true,
}, async (message, match) => {
try {
if (!["sent", "send", "giv", "Giv", "gib", "upload", "Send", "Sent", "znt", "Znt", "snt", "snd", "Snt", "Snd"].includes(message.client.body.toLowerCase())) return;
if (!message.client.isMedia) return;
let a = await message.quoted.download()
let mm = await require('file-type').fromBuffer(a)
return await message.client.sendMessage(message.jid, {
[mm.mime.split('/')[0]]: a
});
} catch (e) {
await message.send(e);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment