Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random-ppcp.js #8

Open
ahmed1p7 opened this issue Mar 7, 2023 · 1 comment
Open

random-ppcp.js #8

ahmed1p7 opened this issue Mar 7, 2023 · 1 comment

Comments

@ahmed1p7
Copy link

ahmed1p7 commented Mar 7, 2023

import fetch from 'node-fetch';

const getRandomProfilePicture = async (gender) => {
const res = await fetch(https://randomuser.me/api/?gender=${gender});
const data = await res.json();
const profilePicture = data.results[0].picture.large;
return profilePicture;
};

const handler = async (m, { conn, command }) => {
const femaleProfilePicture = await getRandomProfilePicture('female');
const maleProfilePicture = await getRandomProfilePicture('male');

conn.sendButton(
m.chat,
'𝘾𝙃𝙄𝘾𝘼 ✨',
wm,
femaleProfilePicture,
[['𝙎𝙄𝙂𝙐𝙄𝙀𝙉𝙏𝙀 | 𝙉𝙀𝙓𝙏 🆕', /${command}]],
m
);

conn.sendButton(
m.chat,
'𝘾𝙃𝙄𝘾𝙊 ✨',
wm,
maleProfilePicture,
[['𝙎𝙄𝙂𝙐𝙄𝙀𝙉𝙏𝙀 | 𝙉𝙀𝙓𝙏 🆕', /${command}]],
m
);
};

handler.help = ['ppcouple'];
handler.tags = ['internet'];
handler.command = /^(ppcp|ppcouple|compartirperfil|compartirfoto)$/i;

export default handler;

@ahmed1p7
Copy link
Author

ahmed1p7 commented Mar 7, 2023

There was Error in this code and it didn't work this code works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant