Skip to content

Commit

Permalink
> V3
Browse files Browse the repository at this point in the history
  • Loading branch information
GlobalTechInfo authored Oct 11, 2024
1 parent cfbaeb8 commit e23f8d7
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions plugins/main-creator.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
function handler(m) {
const data = global.botNumber.filter(([id, isCreator]) => id && isCreator)
this.sendContact(
m.chat,
data.map(([id, name]) => [id, name]),
m
)
}
let handler = async function (m, { conn, text }) {
const botNumbers = global.owner.map(owner => owner[0]);
botNumbers.push(global.botNumber); // Include botNumber

const uniqueNumbers = [...new Set([...botNumbers, ...global.mods])];
const commonNumbers = uniqueNumbers.filter(number =>
botNumbers.includes(number) && global.mods.includes(number) && global.owner.some(owner => owner[0] === number)
);

handler.help = ['owner']
handler.tags = ['main']
handler.command = ['owner', 'creator', 'creador', 'dueño', 'Gowner']
if (commonNumbers.length > 0) {
conn.reply(m.chat, `❇️ Here Is The Contact Of My Owner: ${commonNumbers.join(', ')}`, m);
} else {
conn.reply(m.chat, `You are not recognized as a bot owner.`, m);
}
};

export default handler
handler.help = ['owner'];
handler.tags = ['main'];
handler.command = /^owner$/i;

export default handler;

0 comments on commit e23f8d7

Please sign in to comment.