Skip to content

Commit

Permalink
Button Fix (#69)
Browse files Browse the repository at this point in the history
also changed quote (output) and one readme link of okteto
  • Loading branch information
IndraTensei authored Jul 28, 2023
1 parent e21560d commit f0d0922
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 43 deletions.
27 changes: 13 additions & 14 deletions plugins/_autoReply.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

export async function all(m) {

// when someone sends a group link to the bot's dm
if ((m.mtype === 'groupInviteMessage' || m.text.startsWith('https://chat') || m.text.startsWith('open this link')) && !m.isBaileys && !m.isGroup) {
this.sendButton(m.chat, `*Invite bot to a group*
Hallo @${m.sender.split('@')[0]}
you can rent the bot to join a group or contact owner
more info click on the button
`.trim(), igfg, null, [['Rent', '/buyprem']] , m, { mentions: [m.sender] })
m.react('💎')
}
return !0
}
// when someone sends a group link to the bot's dm
if ((m.mtype === 'groupInviteMessage' || m.text.startsWith('https://chat') || m.text.startsWith('open this link')) && !m.isBaileys && !m.isGroup) {
this.sendMessage(m.chat,{text:`Hello @${m.sender.split('@')[0]}\nyou can rent the bot to join a group\n\n_For more info you can DM the owner_\n*Type* \`\`\`.owner\`\`\` *to contact the owner*`.trim()}, {quoted:m});
/*this.sendButton(m.chat, `*Invite bot to a group*
Hallo @${m.sender.split('@')[0]}
you can rent the bot to join a group or contact owner
more info click on the button
`.trim(), igfg, null, [['Rent', '/buyprem']] , m, { mentions: [m.sender] })*/
m.react('💎')
}

return !0
}
2 changes: 1 addition & 1 deletion plugins/animequote.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const handler = async (m, { conn }) => {
const json = await res.json();
const { sentence, character, anime } = json;

const message = `❖𝙌𝙐𝙊𝙏𝙀 ${sentence}\n\n❖𝘾𝙃𝘼𝙍𝘼𝘾𝙏𝙀𝙍 ${character}\n❖𝘼𝙉𝙄𝙈𝙀 ${anime}`;
const message = `❖𝐐𝐔𝐎𝐓𝐄\n${sentence}\n\n❖𝐂𝐇𝐀𝐑𝐀𝐂𝐓𝐄𝐑: \`\`\`${character}\`\`\`\n❖𝐀𝐍𝐈𝐌𝐄: \`\`\`${anime}\`\`\`\n`;
conn.sendMessage(m.chat, { text: message }, 'extendedTextMessage', { quoted: m });
} catch (error) {
console.error(error);
Expand Down
62 changes: 48 additions & 14 deletions plugins/main-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ let str = `
┃ 📚 *Total Users:* ${totaluser}
┗━━━━━━━━━━━━━┛
💡 *_Remember, when in doubt, use ${usedPrefix}list. It's like my magic spell book!_* 💡
💡 *_Remember, when in doubt, use ${usedPrefix}list or ${usedPrefix}help2. It's like my magic spell book!_* 💡
`


Expand Down Expand Up @@ -104,22 +104,56 @@ function clockString(ms) {
"I'm not lazy, I'm just on my energy saving mode.",
"Life is short, smile while you still have teeth.",
"I may be a bad influence, but darn I am fun!",
"वक्त हमे बहुत कुछ सिखा देता है, खासकर तब जब हमारे पास वक्त नहीं होता।",
"जिंदगी एक किताब की तरह होती है, हर दिन नया पन्ना बदलता है। कभी हंसते हैं, कभी रोते हैं, पर हर किसी की कहानी अधूरी होती है!",
"पढ़ाई करो तो दिल लगता नही, दिल लगाओ तो दिमाग़ लगता नहीं।",
"दोस्ती इतनी गहरी करो की दिल में बस जाओ, ऐसे दोस्ती निभाओ की हमे भी तुम्हारे दोस्त होने पर नाज हो।",
"मेरे दोस्त तुम बहुत याद आते हो, जब भी भूख लगती है वो समोसे बहुत याद आते है।",
"जीवन का असली मज़ा तो तब आता है, जब दूसरे आपकी ज़िंदगी जीने की कोशिश करते हैं।",
"कुछ लोग तो इतने फालतू होते हैं, खुद की ज़िंदगी खुद ही नहीं जी पाते और दूसरों की ज़िंदगी में टांग अड़ा देते हैं।",
"I'm on a whiskey diet. I've lost three days already.",
"Why don't some couples go to the gym? Because some relationships don't work out.",
"I told my wife she should embrace her mistakes... She gave me a hug.",
"If I'm not back in five minutes, wait longer!",
"I asked my wife if I was the only one she's been with. She said, 'Yes, the others were nines and tens.'",
"Don’t worry if plan A fails, there are 25 more letters in the alphabet.",
"I'm great at multitasking. I can waste time, be unproductive, and procrastinate all at once.",
"You know you're getting old when you stoop to tie your shoelaces and wonder what else you could do while you're down there.",
"I'm so good at sleeping, I can do it with my eyes closed.",
"If you think nobody cares if you’re alive, try missing a couple of payments."
]

"If you think nobody cares if you’re alive, try missing a couple of payments.",
"I used to think I was indecisive, but now I'm not so sure.",
"If you can't convince them, confuse them.",
"I told my wife she was drawing her eyebrows too high. She looked surprised.",
"I'm not clumsy, I'm just on a mission to test gravity.",
"I told my wife she should do more push-ups. She said, 'I could do a hundred!' So I counted to ten and stopped.",
"Life is like a box of chocolates; it doesn't last long if you're hungry.",
"I'm not saying I'm Wonder Woman, I'm just saying no one has ever seen me and Wonder Woman in the same room together.",
"Why do they call it beauty sleep when you wake up looking like a troll?",
"I don't always lose my phone, but when I do, it's always on silent.",
"My bed is a magical place where I suddenly remember everything I was supposed to do.",
"I love the sound you make when you shut up.",
"I'm not arguing, I'm just explaining why I'm right.",
"I'm not a complete idiot, some parts are missing.",
"When life gives you lemons, squirt someone in the eye.",
"I don't need anger management. You just need to stop making me angry.",
"I'm not saying I'm Batman. I'm just saying no one has ever seen me and Batman in the same room together.",
"I'm not saying I'm Superman. I'm just saying no one has ever seen me and Superman in the same room together.",
"I'm not saying I'm Spider-Man. I'm just saying no one has ever seen me and Spider-Man in the same room together.",
"I'm not saying I'm a superhero. I'm just saying no one has ever seen me and a superhero in the same room together.",
"The early bird can have the worm because worms are gross and mornings are stupid.",
"If life gives you lemons, make lemonade. Then find someone whose life has given them vodka and have a party!",
"The road to success is always under construction.",
"I am so clever that sometimes I don't understand a single word of what I am saying.",
"Some people just need a high-five. In the face. With a chair.",
"I'm not saying I'm perfect, but I'm pretty close.",
"A day without sunshine is like, you know, night.",
"The best way to predict the future is to create it.",
"If you can't be a good example, then you'll just have to be a horrible warning.",
"I don't know why I keep hitting the escape button. I'm just trying to get out of here.",
"I'm not lazy. I'm on energy-saving mode.",
"I don't need a hairstylist, my pillow gives me a new hairstyle every morning.",
"I don't have a bad handwriting, I have my own font.",
"I'm not clumsy. It's just the floor hates me, the table and chairs are bullies, and the walls get in my way.",
"I'm not saying I'm Batman. I'm just saying no one has ever seen me and Batman in the same room together.",
"I'm not saying I'm Wonder Woman. I'm just saying no one has ever seen me and Wonder Woman in the same room together.",
"I'm not saying I'm Superman. I'm just saying no one has ever seen me and Superman in the same room together.",
"I'm not saying I'm Spider-Man. I'm just saying no one has ever seen me and Spider-Man in the same room together.",
"I'm not saying I'm a superhero. I'm just saying no one has ever seen me and a superhero in the same room together.",
"वक्त हमे बहुत कुछ सिखा देता है, खासकर तब जब हमारे पास वक्त नहीं होता।",
"जिंदगी एक किताब की तरह होती है, हर दिन नया पन्ना बदलता है। कभी हंसते हैं, कभी रोते हैं, पर हर किसी की कहानी अधूरी होती है!",
"पढ़ाई करो तो दिल लगता नही, दिल लगाओ तो दिमाग़ लगता नहीं।",
"दोस्ती इतनी गहरी करो की दिल में बस जाओ, ऐसे दोस्ती निभाओ की हमे भी तुम्हारे दोस्त होने पर नाज हो।",
"मेरे दोस्त तुम बहुत याद आते हो, जब भी भूख लगती है वो समोसे बहुत याद आते है।",
"जीवन का असली मज़ा तो तब आता है, जब दूसरे आपकी ज़िंदगी जीने की कोशिश करते हैं।",
"कुछ लोग तो इतने फालतू होते हैं, खुद की ज़िंदगी खुद ही नहीं जी पाते और दूसरों की ज़िंदगी में टांग अड़ा देते हैं।"
];
9 changes: 4 additions & 5 deletions plugins/main-menu2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fetch from 'node-fetch'
let handler = async function (m, { conn, text, usedPrefix }) {

let m2 = `
≡ _Use the commands with the prefix .
≡ _Use the commands with the prefix_ \`\`\`${usedPrefix}\`\`\`
▢ ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‎
Ⓟ = Premium
Expand Down Expand Up @@ -221,13 +221,12 @@ let m2 = `
Bot has more than 300 commands and i am lazy to write all
`
//const pp = await (await fetch('https://i.ibb.co/qMG1JPY/fg.jpg')).buffer()
let pp = './Guru.jpg'
/*let pp = './Guru.jpg'
conn.sendButton(m.chat, m2, '▢ ᴳᵁᴿᵁ ┃ ᴮᴼᵀ\n▢ Follow on Instagram\nhttps://www.instagram.com/asli_guru69\n', pp, [
['⏍ Info', `${usedPrefix}botinfo`],
['⌬ Groups', `${usedPrefix}gpguru`]
],m, rpyt)

],m, rpyt) */
conn.sendMessage(m.chat,{text: m2}, m.sender)
}

handler.help = ['audios']
Expand Down
3 changes: 2 additions & 1 deletion plugins/owner-addexpired.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ let handler = async (m, { conn, args, usedPrefix, command }) => {
if (now < global.db.data.chats[who].expired) global.db.data.chats[who].expired += nDays
else global.db.data.chats[who].expired = now + nDays
let teks = `✅ The expiration days were established for \n*${await conn.getName(who)}* \n\n*Duration:* ${args[0]} Days\n\n*Countdown :* ${msToDate(global.db.data.chats[who].expired - now)}`
conn.sendButton(m.chat, teks, igfg, null, [['Del Expired', `${usedPrefix}delexpired`], ['Check Expired', `${usedPrefix}checkexpired`]], m)
m.reply(teks)
//conn.sendButton(m.chat, teks, igfg, null, [['Del Expired', `${usedPrefix}delexpired`], ['Check Expired', `${usedPrefix}checkexpired`]], m)
}
handler.help = ['expired <días>']
handler.tags = ['owner']
Expand Down
15 changes: 8 additions & 7 deletions plugins/owner-join.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

//need fix
let handler = async (m, { conn, text, usedPrefix, command, args, participants, isOwner }) => {

if (!isOwner) return conn.sendButton(m.chat, `*Invite bot to a group*\n\nHello @${m.sender.split('@')[0]}\nyou can rent the bot to join a group\n\n_more info click on the button_`.trim(), igfg, null, [
['Alquilar', `${usedPrefix}buyprem`]] , m, { mentions: [m.sender] })

if (!isOwner) return conn.sendMessage(m.chat,{text:`*Invite bot to a group*\n\nHello @${m.sender.split('@')[0]}\nyou can rent the bot to join a group\n\n_For more info you can DM the owner_\n*Type* \`\`\`.owner\`\`\` *to DM the owner*`.trim()}, {quoted:m});
/*if (!isOwner) return conn.sendButton(m.chat, `*Invite bot to a group*\n\nHello @${m.sender.split('@')[0]}\nyou can rent the bot to join a group\n\n_more info click on the button_`.trim(), igfg, null, [
['Alquilar', `${usedPrefix}buyprem`]] , m, { mentions: [m.sender] })*/

let time = global.db.data.users[m.sender].lastjoin + 86400000
let linkRegex = /chat.whatsapp.com\/([0-9A-Za-z]{20,24})/i
let delay = time => new Promise(res => setTimeout(res, time))
Expand Down Expand Up @@ -50,9 +51,9 @@ to see the menu of the bot write
${usedPrefix}help
@${conn.user.jid.split('@')[0]} will exit automatically after \n\n${msToDate(global.db.data.chats[res].expired - now)}`
await conn.sendButton(res, mes, igfg, null, [[`✆ Owner`, `${usedPrefix}fgowner`], [`⦙☰ Menu`, `${usedPrefix}help`]], m, {
mentions: d
})
await conn.sendMessage(m.chat, mes, m, {
mentions: d
})
})
} catch (e) {
conn.reply(global.owner[1]+'@s.whatsapp.net', e)
Expand Down
3 changes: 2 additions & 1 deletion plugins/tool-autosticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ if (!img) return
stiker = await createSticker(img, false, packname || global.packname, author || global.author)
//stiker = await sticker(img, false, packname, author)
} else if (/video/g.test(mime)) {
if (/video/g.test(mime)) if ((q.msg || q).seconds > 8) return await this.sendButton(m.chat, '*Send video of 7 seconds*', wm, [['DEACTIVE AUTOSTICKER', '/disable autosticker']], m)
//if (/video/g.test(mime)) if ((q.msg || q).seconds > 8) return await this.sendButton(m.chat, '*Send video of 7 seconds*', wm, [['DEACTIVE AUTOSTICKER', '/disable autosticker']], m)
if (/video/g.test(mime)) if ((q.msg || q).seconds > 8) return await this.sendReply(m.chat,{text:'*Send video of 7 seconds*'}, m.sender)
let img = await q.download()
if (!img) return
stiker = await mp4ToWebp(img, { pack: packname || global.packname, author: author || global.author })
Expand Down

0 comments on commit f0d0922

Please sign in to comment.