Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackAmda committed Nov 30, 2022
1 parent 7906730 commit d3f863d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions plugins/_amdi_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ AMDI({ cmd: ["panel", "list", "menu"], desc: "Queen Amdi Main Menu", type: "prim

const audioURL = amdiVoice
const pttStatus = true
//let mimeType = msgDevice == 'ios' ? 'audio/ogg; codecs=opus' : 'audio/mp4'
await sendAudioMsg({ url: audioURL }, {mimetype: "audio/ogg; codecs=opus", ptt: pttStatus});
let mimeType = msgDevice == 'ios' ? 'audio/mp4' : 'audio/ogg; codecs=opus'
await sendAudioMsg({ url: audioURL }, {mimetype: mimeType, ptt: pttStatus});
const PANEL_HEADER = await getSettings('PANEL_HEADER');
let text = !PANEL_HEADER.input || PANEL_HEADER.input == 'default' ? `\n*Hello!* ${sendername}` + Lang.panelText : PANEL_HEADER.input.keywords();

Expand Down
3 changes: 1 addition & 2 deletions plugins/deleteMsg.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ AMDI({ cmd: "delall", desc: Lang.delAllDesc, type: "admin" }, (async (amdiWA) =>
let num_split = taggedJid.split("@s.whatsapp.net")[0];
let warnMsg = `*@${num_split} ,${Lang.banMsg}*`;
//await amdiWA.web.sendMessage(amdiWA.clientJID, { sticker: {url: 'https://i.ibb.co/8m0sGwz/lolwennayanne.webp'} });
const banmsg = await amdiWA.web.sendMessage(amdiWA.clientJID, {text: warnMsg, mentions: [taggedJid]}, { quoted: (amdiWA.fromMe === false ? amdiWA.msg : '') } );
react("☠️", banmsg)
await sendText(warnMsg, {mentionJIDS: [taggedJid], quoted: true, reactEmoji: "☠️"});
return await setDelAllJids(taggedJid, 'User: +' + taggedJid.split('@')[0], amdiWA.clientJID);
}));

Expand Down
4 changes: 1 addition & 3 deletions plugins/stickers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ you may not use this file except in compliance with the License.*/

const { AMDI, amdiDB, Language, sticker } = require('queen_amdi_core/dist/scripts')
const { getSettings } = amdiDB.settingsDB
const axios = require('axios');
require('dotenv').config();
const fs = require('fs');
const ffmpeg = require('fluent-ffmpeg');
const { stringify } = require('querystring');
const Lang = Language.getString('stickers');


Expand Down Expand Up @@ -69,7 +67,7 @@ AMDI({ cmd: ["imagestic", "stickerimage", "imagesticker", "stic2img"], desc: Lan
return reply(`*Error:*\n${err.message}`);
})
.on("end", async () => {
await amdiWA.web.sendMessage(amdiWA.clientJID, { image: fs.readFileSync("result.png"), caption: caption }, { mimetype: 'image/png', quoted: (amdiWA.fromMe === false ? amdiWA.msg : '') });
await amdiWA.web.sendMessage(amdiWA.clientJID, { image: fs.readFileSync("result.png"), caption: caption }, { mimetype: 'image/png', quoted: (amdiWA.fromMe === false ? amdiWA.msg : ''), ephemeralExpiration: amdiWA.ephDuration });
try {
fs.unlinkSync(media.file)
fs.unlinkSync("result.png");
Expand Down
9 changes: 4 additions & 5 deletions plugins/system_status.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,15 @@ AMDI({ cmd: "ping", desc: Lang.PingDesc, type: "primary", react: "📍" }, (asyn


AMDI({ cmd: "system", desc: "Bot Status", cmdHideInMenu: true }, (async (amdiWA) => {
let { react } = amdiWA.msgLayout;
let { reply, sendText } = amdiWA.msgLayout;

let uptime = await runtime(process.uptime());
var start = new Date().getTime();
var checkSTS = await amdiWA.web.sendMessage(amdiWA.clientJID, { text: '_Checking status..._' });
var checkSTS = await sendText('_Checking status..._', {});
var end = new Date().getTime();
const usage = `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB / ${Math.round(require('os').totalmem / 1024 / 1024)}MB`
const status = await amdiWA.web.sendMessage(amdiWA.clientJID, { text: '```⚕️Queen Amdi MD - Status⚕️```\n\n' + Lang.upTime + uptime + `\n` + Lang.ping + (end - start) +'\n'+ Lang.memUsage + usage}, { quoted: (amdiWA.fromMe === false ? amdiWA.msg : '') });
await amdiWA.web.sendMessage(amdiWA.clientJID, { delete: checkSTS.key })
return await react("💻", status)
await reply('```⚕️Queen Amdi MD - Status⚕️```\n\n' + Lang.upTime + uptime + `\n` + Lang.ping + (end - start) +'\n'+ Lang.memUsage + usage, "💻");
return await amdiWA.web.sendMessage(amdiWA.clientJID, { delete: checkSTS.key });
}));


Expand Down

0 comments on commit d3f863d

Please sign in to comment.