dappros/ethora

View on GitHub
bots/questionnaire/handlers/help.js

Summary

Maintainability
A
3 hrs
Test Coverage
import {sendMessage} from "../actions.js";
import messages from "../config/messages.js";

export const helpHandler = (data) => {
    console.log('=> helpHandler | Message received from ', data.receiver, data.message);

    if(data.userStep === 1){
        return sendMessage(
            data,
            messages.help.whereToBegin,
            'message',
            false,
            0,
        );
    }

    if(data.userStep === 2){
        return sendMessage(
            data,
            messages.help.secondStep,
            'message',
            false,
            0,
        );
    }

}