Skip to content

Commit

Permalink
Update info-speedtest.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Flores authored Apr 10, 2024
1 parent 8bf90ca commit bac434b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plugins/info-speedtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ const handler = async (m) => {
const { stdout, stderr } = o;
if (stdout.trim()) {
const result = stdout.trim();

const match = result.match(/https?:\/\/\S+/);
if (match) {
const imageLink = match[0];

await conn.sendFile(m.chat, imageLink, 'speedtest.png', 'Resultado del speedtest:');
await conn.reply(m.chat, result.replace(imageLink, ''), m);
await conn.sendFile(m.chat, imageLink, 'speedtest.png', `${result}`);
} else {
await conn.reply(m.chat, result, m);
}
Expand Down

0 comments on commit bac434b

Please sign in to comment.