Skip to content

Commit

Permalink
Merge pull request #143 from Guru322/patch-69
Browse files Browse the repository at this point in the history
УЛУЧШЕНИЕ
  • Loading branch information
Guru322 authored Nov 8, 2023
2 parents 3625d0f + c2df8b5 commit 8231071
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Guru.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"required": true,
"value": ""
},
"PRIVATE": {
"description": "Set it true if you want to make the bot private, leave Blank for public",
"required": false,
"value": ""
},
"PREFIX": {
"description": "put any one symbol here except @ and + , leave it Blank if you want to use multiple prefix",
"required": false,
Expand All @@ -43,3 +48,4 @@
}
]
}

6 changes: 3 additions & 3 deletions handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,6 @@ export async function handler(chatUpdate) {
}
if (opts["nyimak"])
return
if (!m.fromMe && opts["self"])
return
if (opts["pconly"] && m.chat.endsWith("g.us"))
return
if (opts["gconly"] && !m.chat.endsWith("g.us"))
Expand All @@ -221,7 +219,9 @@ export async function handler(chatUpdate) {
await delay(time)
}, time)
}

if (process.env.PRIVATE && !(isROwner || isOwner))
return

if (m.isBaileys)
return
m.exp += Math.ceil(Math.random() * 10)
Expand Down
15 changes: 2 additions & 13 deletions plugins/enable.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,7 @@ case 'autobio':
}
chat.viewStory = isEnable
break
case 'selfbot':
case 'self':
case 'selfmode':
case 'private':
isAll = true
if (!isROwner) {
global.dfail('rowner', m, conn)
throw false
}
global.opts['self'] = isEnable
break

case 'antilink':
case 'antilinkwa':
case 'antilinkwha':
Expand Down Expand Up @@ -236,12 +226,10 @@ case 'autobio':
⛊ chatbot
╰──────────⳹
◈──『 *OWNER*』───⳹
⛊ selfmode
⛊ onlydm
⛊ grouponly
⛊ autotype
⛊ autobio
⛊ autostatus
╰──────────⳹
*📌 Example :*
*${usedPrefix}on* welcome
Expand All @@ -260,3 +248,4 @@ handler.tags = ['config']
handler.command = /^((en|dis)able|(turn)?o(n|ff)|[01])$/i

export default handler

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 8231071

Please sign in to comment.