Skip to content

Commit

Permalink
Merge pull request #329 from vasani-arpit/dev
Browse files Browse the repository at this point in the history
v0.29.0
  • Loading branch information
vasani-arpit authored Jul 13, 2022
2 parents 1cf2cec + 57258e8 commit 2758107
Show file tree
Hide file tree
Showing 15 changed files with 2,942 additions and 4,415 deletions.
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/javascript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT="18-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"

# setting up puppteer to work headlessly
RUN su node -c "npx playwright install-deps chromium"
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16-bullseye" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"git": "os-provided",
"github-cli": "latest"
}
}
16 changes: 16 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## update and install some things we should probably have
apt-get update
apt-get install -y \
curl \
git \
gnupg2 \
jq \
sudo \
zsh

## setup and install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
cp -R /root/.oh-my-zsh /home/$USERNAME
cp /root/.zshrc /home/$USERNAME
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/$USERNAME\/.oh-my-zsh/g" /home/$USERNAME/.zshrc
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,8 @@ chromium-data
.idea

linux*
wbot*
wbot*

.auth-data

media
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
<a href="#goals">Goals</a> •
<a href="#faq">FAQ</a>

## ✨Update 30th Mar 2021
Started as small side project, WBOT has become essential tool for small business owners who runs their business on whatsapp. WBOT helps them simplify business transitions by saving time and resources. I am overwhelmed by the support I received from all people on my email and telegram. I will continue updating WBOT.

Thank you 🙏



## 🔍 Preview

Expand Down Expand Up @@ -152,7 +146,7 @@ here is how that looks

## Run the latest code from Github

**This is only recommended for advanced 'node.js' users or development purpose.**
**This is only recommended for advanced 'node.js' users or for development purpose.**

Open a Terminal and create a new directory in your home directory, e.g. 'node' and goto there.
Now download and run the latest code from github by:
Expand Down
2 changes: 1 addition & 1 deletion bot.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"headless": false,
"isGroupReply":false,
"webhook":"",
"downloadMedia": false,
"downloadMedia": true,
"replyUnreadMsg": false,
"CustomInjectionFolder": ""
},
Expand Down
17 changes: 17 additions & 0 deletions docs/reply-logic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[![](https://mermaid.ink/img/pako:eNplVE1z4jAM_SuaXHpp-QEcdmcL_aTQFmg7O6EHkyjgIbEzjrOUgf73lW0FEtoDUz89PT1LcvZRolOM-tHKiHIN8-FCAf39iQusKrFCMJig_IfpJ4TI9f6hAmlBwMrougTm_f4O4cFeUri6c7EplvkOrKkRpIJEq0yuGt4wzvWqD1utLiykGoTa2bVUK1hiIuoKuxqkqbPsM6TehNTG2LkTZt06I3aNoOpiicY5WOY62eSyso2Ju6A0YUblSdpeVIEKjtuDrcxzZ1Fp75D177kPBaZSnHfhwRVP9VblWqRjzwjXB60azmM8ZIK36XVYexR8dQVCD3pcMJM5Bmdki5p2JNOkgsiTn4QblMUve-5wHEq8qY2ixCYKdle2Rh6ok6MQfomElIRN1o3Oc2z8hEQFJfUw3LIHMoOizq0syaXnox-GggpV2gqFsr7xXodLvhxLlsJYKfJu0VcXVnrsMMCitLsmMo3HwmyO1yFXBkVzkVm4c5PoNWj5MJMK0x58nO8ip81jXmTtB0XLaZrrshQT33jlDBWGRJRWnqb9TtN28tytboWPeCBokltcrrXeEMiPEK6ufsE1vzt3OPzF6gA3_A58eMDvzh8OE32AYQfxGbctjUBi5LZFuutAjnTPq94iPXQgR3rilT-RHjsIcUa8kaekcQfxyhPethM07SCU9sLb8YMy9chzJ0z8V16XU915B3EKM57dTyePHnrrxEnjnRffAx883fZh3j7M2odRoxiO7je6jAo0hZApfYP3DllEtEIFLqI-_UvLKeixLKKF-iZqXabC4k0qrTZRPxN5hZeRqK2e7VQS9d2ntiENpaBPesGs7__Pu9jg)](https://mermaid-js.github.io/mermaid-live-editor/edit#pako:eNplVE1z4jAM_SuaXHpp-QEcdmcL_aTQFmg7O6EHkyjgIbEzjrOUgf73lW0FEtoDUz89PT1LcvZRolOM-tHKiHIN8-FCAf39iQusKrFCMJig_IfpJ4TI9f6hAmlBwMrougTm_f4O4cFeUri6c7EplvkOrKkRpIJEq0yuGt4wzvWqD1utLiykGoTa2bVUK1hiIuoKuxqkqbPsM6TehNTG2LkTZt06I3aNoOpiicY5WOY62eSyso2Ju6A0YUblSdpeVIEKjtuDrcxzZ1Fp75D177kPBaZSnHfhwRVP9VblWqRjzwjXB60azmM8ZIK36XVYexR8dQVCD3pcMJM5Bmdki5p2JNOkgsiTn4QblMUve-5wHEq8qY2ixCYKdle2Rh6ok6MQfomElIRN1o3Oc2z8hEQFJfUw3LIHMoOizq0syaXnox-GggpV2gqFsr7xXodLvhxLlsJYKfJu0VcXVnrsMMCitLsmMo3HwmyO1yFXBkVzkVm4c5PoNWj5MJMK0x58nO8ip81jXmTtB0XLaZrrshQT33jlDBWGRJRWnqb9TtN28tytboWPeCBokltcrrXeEMiPEK6ufsE1vzt3OPzF6gA3_A58eMDvzh8OE32AYQfxGbctjUBi5LZFuutAjnTPq94iPXQgR3rilT-RHjsIcUa8kaekcQfxyhPethM07SCU9sLb8YMy9chzJ0z8V16XU915B3EKM57dTyePHnrrxEnjnRffAx883fZh3j7M2odRoxiO7je6jAo0hZApfYP3DllEtEIFLqI-_UvLKeixLKKF-iZqXabC4k0qrTZRPxN5hZeRqK2e7VQS9d2ntiENpaBPesGs7__Pu9jg)

## Test scnarios

- User-to-user text message with exact match
- User-to-user text message with partial match
- User-to-user text message with no match
- User-to-group text message with exact match
- User-to-group text message with partial match
- User-to-group text message with no match
- User-to-user media message (with caption) with exact match
- User-to-user media message (with caption) with partial match
- User-to-user media message (with caption) with no match
- User-to-group media message (with caption) with exact match
- User-to-group media message (with caption) with partial match
- User-to-group media message (with caption) with no match

1 change: 1 addition & 0 deletions docs/webhook-logic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[![](https://mermaid.ink/img/pako:eNp9kjFvgzAQhf_KyXPI0KGVGFo1gUSVqi6pFFWQwbEPsAI-ZJu0FeS_1wETKUuZ4N139x5n90yQRBaz0vC2gs8k1-Cf12yPx4roBEWnhVOkQfC6RnmACVj1bxYMkYMaz7yG74AL0oUqO4Py5TKR615ZONYkTlcU_0OTbO1NwFV4g86Kg_YJowKdqKLzw_Jx-QRkxgL_UWQPU2_aiwq9h0Hbkra4BG-rHPhw6mawyd6pjAGN8RMatJaXGPq32Q61nEUL3EKLZswyj_Rk2A5E0TOswibGj-EL7QDJnfRBA6zDEkYllJOpvOc-XuGDzPOHNPzKrX1zJ1wttnMGtmANmoYr6Q-vv2o582EbzFnsXyU3p5zl-uK5rpXcYSqVI8PigtcWF4x3jna_WrDYmQ5nKFHcX4QmUJc_akaukg)](https://mermaid-js.github.io/mermaid-live-editor/edit#pako:eNp9kjFvgzAQhf_KyXPI0KGVGFo1gUSVqi6pFFWQwbEPsAI-ZJu0FeS_1wETKUuZ4N139x5n90yQRBaz0vC2gs8k1-Cf12yPx4roBEWnhVOkQfC6RnmACVj1bxYMkYMaz7yG74AL0oUqO4Py5TKR615ZONYkTlcU_0OTbO1NwFV4g86Kg_YJowKdqKLzw_Jx-QRkxgL_UWQPU2_aiwq9h0Hbkra4BG-rHPhw6mawyd6pjAGN8RMatJaXGPq32Q61nEUL3EKLZswyj_Rk2A5E0TOswibGj-EL7QDJnfRBA6zDEkYllJOpvOc-XuGDzPOHNPzKrX1zJ1wttnMGtmANmoYr6Q-vv2o582EbzFnsXyU3p5zl-uK5rpXcYSqVI8PigtcWF4x3jna_WrDYmQ5nKFHcX4QmUJc_akaukg)
Loading

0 comments on commit 2758107

Please sign in to comment.