Skip to content

Commit

Permalink
УЛУЧШЕНИЕ
Browse files Browse the repository at this point in the history
  • Loading branch information
Guru322 authored Nov 8, 2023
1 parent e3e7793 commit c2df8b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/owner-addsudo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ let handler = async (m, { conn, text }) => {
} else {
who = m.chat;
}
let name = await conn.getName(m.quoted.sender)
if (!who) throw 'Tag the person you want to make an Owner!';
if (global.owner.includes(who.split('@')[0])) throw 'This person is already an owner!';
global.owner.push([who.split('@')[0], m.name, true]);
global.owner.push([who.split('@')[0], name, true]);
const caption = `Now @${who.split('@')[0]} has been made an Owner!`;
await conn.reply(m.chat, caption, m, {
mentions: conn.parseMention(caption)
Expand Down

0 comments on commit c2df8b5

Please sign in to comment.