Skip to content

Commit

Permalink
Smart reply was causing error. Putting it aside for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasani-arpit committed Jun 7, 2020
1 parent 3e0bf31 commit 16ad268
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Array of numbers with county code to which this bot will not reply to.

Default reply message or [spintax](https://spintaxtool.appspot.com/) when no exact match found in BOT

**smartreply**
**smartreply** *(This feature is under maintenance at the moment.)*

An object which contains suggestions and it's configs.

Expand Down
2 changes: 1 addition & 1 deletion bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"blocked": [],
"noMatch":"{🤔|👍}",
"smartreply":{
"suggestions":["👍","Ha","aevu m?","Okay","Thanks"],
"suggestions":[],
"clicktosend":true
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wbot",
"version": "0.12.6",
"version": "0.12.7",
"description": "A simple whatsapp reply bot using puppeteer.",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function Main() {
if (!isLogin) {
await getAndShowQR();
}
if (configs.smartreply.suggestions.length >= 0) {
if (configs.smartreply.suggestions.length > 0) {
await setupSmartReply();
}
console.log("WBOT is ready !! Let those message come.");
Expand Down Expand Up @@ -167,7 +167,7 @@ async function Main() {

async function setupSmartReply() {
spinner.start("setting up smart reply");
await page.waitForSelector(".app");
await page.waitForSelector("#app");
await page.evaluate(`
var observer = new MutationObserver((mutations) => {
for (var mutation of mutations) {
Expand Down

0 comments on commit 16ad268

Please sign in to comment.