-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfbaeb8
commit e23f8d7
Showing
1 changed file
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |