All Projects → eFishery → Nemo

eFishery / Nemo

Interactive WhatsApp Question Answer like Online Survey

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Nemo

Sgdigittextfield
Elegant and Simplest Digit UITextField
Stars: ✭ 47 (-4.08%)
Mutual labels:  hacktoberfest
Abs cd
CI/CD for the Arch build system with webinterface.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Licensir
An Elixir mix task that lists all the licenses used by your Mix project dependencies.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Libratbag
A DBus daemon to configure input devices, mainly high-end and gaming mice
Stars: ✭ 1,036 (+2014.29%)
Mutual labels:  hacktoberfest
Audioplayers
A Flutter plugin to play multiple audio files simultaneously (Android/iOS)
Stars: ✭ 1,042 (+2026.53%)
Mutual labels:  hacktoberfest
Data Structure And Algorithms
A complete and efficient guide for Data Structure and Algorithms.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Flutter shuttletracker
Shuttle Tracker in Flutter
Stars: ✭ 47 (-4.08%)
Mutual labels:  hacktoberfest
Phppresentation
A pure PHP library for reading and writing presentations documents
Stars: ✭ 1,044 (+2030.61%)
Mutual labels:  hacktoberfest
Resources
Here is a list of best resources to get you started with learning how to code (mostly related to Web Development). Feel free to add your favorite resources as well and help others in their journey of learning.
Stars: ✭ 1,037 (+2016.33%)
Mutual labels:  hacktoberfest
Pocket Casts Desktop App
The Pocket Casts webapp, packaged for the Linux Desktop.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Share Backported
Extension to get back the Firefox Share modal
Stars: ✭ 47 (-4.08%)
Mutual labels:  hacktoberfest
Nookies
🍪 A set of cookie helpers for Next.js
Stars: ✭ 1,035 (+2012.24%)
Mutual labels:  hacktoberfest
Ember Octane Vs Classic Cheat Sheet
A cheat sheet for converting classic Ember app to Octane
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Al Go Rithms
🎵 Algorithms written in different programming languages - https://zoranpandovski.github.io/al-go-rithms/
Stars: ✭ 1,036 (+2014.29%)
Mutual labels:  hacktoberfest
Smile Format Specification
New home for Smile format (https://en.wikipedia.org/wiki/Smile_(data_interchange_format))
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Mysqlshell Plugins
Plugins for MySQL Shell
Stars: ✭ 47 (-4.08%)
Mutual labels:  hacktoberfest
Th rosenheim
Cross-Platform Flutter App that displays customizable timetables as well as cantine information for students of the Rosenheim Technical University of Applied Sciences.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Boilerplate
Responsive CSS, HTML and JavaScript front-end starting point.
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest
Spongeapi
A Minecraft plugin API
Stars: ✭ 1,043 (+2028.57%)
Mutual labels:  hacktoberfest
Mindconnect Nodejs
NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy - typescript-sdk is waiting for your contributions!
Stars: ✭ 48 (-2.04%)
Mutual labels:  hacktoberfest

NeMo Whataspp ChatBot

A simple question answer like chatbot to simplify you data input.

Showcase

NeMo as the WhatsApp Shop Online Assistant

How to run

to run you need to have enviroment variable as in .env.example, rename it to .env, by default you need to create coral dir or you can specify by env var CORAL_DIR. The coral dir is for the bot configuration, so create a coral directory and put all the coral file in this folder, also you need the WhatsApp session file in order to connect to the current phone

Use this tools to generate the whatsapp session file k1m0ch1/WhatsappLogin, you can download the latest binary file from the latest release

and run with command ./WhatsappLogin -p 08123123123 and scan the QR

or

run with docker

docker run --rm -v sessions:/go/src/github.com/k1m0ch1/WhatsappLogin/sessions k1m0ch1/whatsapplogin:latest -p 08123123123

after you have file 08123123123.gob and coral directory with basic.yml inside, run the NeMo with this command

./NeMo 08123123123

this will find the file 08123123123.gob in the SESSION_DIR environment variable by default this will goes to current directory running file

Run With Docker

you must prepare the coral directory include with yaml file and Whatsapp file session, after that mount volume in docker with example command like this

docker run \
--name NeMo -v $(pwd)/coral:/app/coral \
-v $(pwd)/.sessions/08123123123.gob:/app/08123123123.gob \
k1m0ch1/nemo 08123123123

Understand Basic Coral Configuration

Coral as in the house of the clown fish, is the configuration of the bot in order to specific give the operation to NeMo, you can see the example from the basic.yml or example.yml file

Author

Specifically to define the author of the configuration

author:
  name: name
  phone: "08123123123"
  email: [email protected]

Default Greeting

This will be triggered when users chat any text to NeMo and start to send message and expected by the variable expected_users

default_greeting:
  message: "to start talk with me type\n\n*!start*"

**note: default greeting will never sent to group

Commands

just remember if you want to record or in run process after triggering the commands, but the True value for record and run_process

commands:
  prefix: "!"
  command: "start"
  run_process: True
  message: "Let's start how cool you are"

Message Format Parser

you can use the message with the URL POST with format {{URL}} with POST method

the NeMo will handle this body Response

{
  "message": "response",
  "images": [
    {
      "URL": "link to image",
      "caption": "caption"
    }
  ]
}

The message key will sent a normal response The images key will stored all the image information, and will send the image regarding the length of the array The URL key will parse the image from internet and sent this with a new response along side with the caption

also you can get the indexing of the parameter when user using the command and add some argument, for example user type this command

!start hello world this will trigger this command to having a argument, and whenever the message include the message indexing like {{1}} or {{2}} this will return the argument index, if the message with the format like this everyone {{1}}, I love the {{2}} this will return message everyone hello, I love the world

if the argument is using number you can use function sum(argumentindex,argumentindex,...) to calculate between number, for example the message following format we have {{1}} {{2}} {{3}} and sum of {{1}} and {{3}} is {{sum(1,3)}} with user type the command like this !start 3 2 1 this will return we have 3 2 1 and sum of 3 and 1 is 4

for example if you type !start hello in the chat, the NeMo will sent the body like in the Webhook part and the hello will be inserted in the question part.

Process

This configuration define the question after commands triggered, for a

in order to use validation rule image, you need to specify AWS S3 configuration in .env file

process:
  record: True
  log: False
  timeout: 300
  exit_command:
    prefix: "!"
    command: stop
    message: "alright I'll stop asking"
  end_message: "Hey its done, thank you"
  questions:
    - question:
        slug: first
        asking: please take a pic your beautiful face
        validation:
          rule: image
          message: "must a pic dude!"
    - question:
        slug: second
        asking: tell me some random number
        validation:
          rule: ^[0-9]*$
          message: you can't read that ? I ask you to write some number

if you set the key record to True you need to add the Webhook part

when you set the log key into True, you need to add log parent key

Webhook

In order to save all the input data, you can rely on webhook that built in this ChatBot

webhook:
  service: WEBHOOK
  url: https://url.com/webhook

the data will be sent with POST method to url key with body JSON like this

{
 "phone_number": "628123123123",
 "current_process": "basic",
 "current_question_slug": 1,
 "process_status": "DONE",
 "data": [
  {
   "slug": "first",
   "question": "please take a pic your beautiful face",
   "answer": "https=//public-tools.s3.ap-southeast-1.amazonaws.com/fresh/nemo/645C4CC4141DB97B2A29BBE33725B1BE.jpeg",
   "created": "2020-09-25T13:54:56+07:00"
  },
  {
   "slug": "second",
   "question": "tell me some random number",
   "answer": "1200",
   "created": "2020-09-25T13:55:17+07:00"
  }
 ],
 "sent": "",
 "sent_to": "",
 "created": "2020-09-25T13:54:19+07:00",
 "expired": "2020-09-25T13:59:19+07:00",
 "finished": "2020-09-25T13:55:17+07:00"
}

Log

In order to log every user input when the process start, you can rely on log that built in this ChatBot

webhook:
  service: WEBHOOK
  url: https://url.com/webhook

the data will be sent with POST method to url key with body JSON like above on webhook part

Expected Users

is a list of a phone number that expected by ChatBot, technically a whitelist that chatbot will hear, currenlt I made this for a specific phone number, because I'm not making this for "any" users, currently I want to made that, but I need more validation to implement that

expected_users:
  - 628123123123
  - 628321321312

you can set the expected_users to any so this will targeted the any user for command and default_greeting but the schedules will be disabled due to any users.

to activate bot in group you can just simply add the phonenumber-groupid

expected_users:
  - any

in order for NeMo can run within WhatsApp, you need the whatsapp file session

Generate WhatsApp File Session

Use this tools to generate the whatsapp session file k1m0ch1/WhatsappLogin

you can download the latest binary file from the latest release

and run with command ./WhatsappLogin -p 08123123123 and scan the QR

or

run with docker

docker run --rm -v sessions:/go/src/github.com/k1m0ch1/WhatsappLogin/sessions k1m0ch1/whatsapplogin:latest -p 08123123123

Development Environment

How to run

go run . 08123123123

this will find the file 08123123123.session in the SESSION_DIR environment variable by default this will goes to current directory running file

To Do

[] need to validate if the ChatBot already sent the message, so he will not sent a duplicate message

[] weird file session JSON error parsing, weirdly added the "":"} string in the end

[] build for ANY expected users, along with the builder

[] if error logging in, try to re-login

[] YAM file can be .yaml or .yml, currently only yml is validated

Done List

[] Multi Schedule is not

[] Multi file yml with some with no greeting or no schedule or no commands

[] must test all the builder work well

[] ~ada orang yang nyangkut gara gara status NEXT nya diem, bisanya nge break pas ada ~

[] semua bentuk dokumen harus di kasih handler

[] ada orang yg kirim gambar langsung tanpa command atau session apapun, langsung ngebreak soalnya dia mencoba coral yg tidak exist

[] kirim gambar langsung modar

[] ga ada sesinya langsung modar, masalah di image handler

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].