| 1 | class ActionProvider { |
| 2 | constructor(createChatBotMessage, setStateFunc) { |
| 3 | this.createChatBotMessage = createChatBotMessage; |
| 4 | this.setState = setStateFunc; |
| 5 | } |
| 6 | |
| 7 | |
| 8 | // new method |
| 9 | greet() { |
| 10 | const greetingMessage = this.createChatBotMessage('Nice to you'); |
| 11 | const greeting = this.createChatBotMessage('I am Co-founder & CDO at Admisure'); |
| 12 | const greetnext = this.createChatBotMessage('want to contact me?'); |
| 13 | |
| 14 | this.updateChatbotState(greetingMessage); |
| 15 | this.updateChatbotState(greeting); |
| 16 | this.updateChatbotState(greetnext); |
| 17 | } |
| 18 | |
| 19 | vedio = () => { |
| 20 | const v = this.createChatBotMessage( |
| 21 | 'So nice of you', |
| 22 | ); |
| 23 | const u = this.createChatBotMessage('type email to get my email id.'); |
| 24 | const address = this.createChatBotMessage('type address to get my address'); |
| 25 | const sociallinks = this.createChatBotMessage('type social to get my social links'); |
| 26 | const phoneno = this.createChatBotMessage('type phone to get my Contact Number'); |
| 27 | this.updateChatbotState(v); |
| 28 | this.updateChatbotState(u); |
| 29 | this.updateChatbotState(address); |
| 30 | this.updateChatbotState(sociallinks); |
| 31 | this.updateChatbotState(phoneno); |
| 32 | } |
| 33 | |
| 34 | Face = () => { |
| 35 | const f = this.createChatBotMessage( |
| 36 | 'My email id is', |
| 37 | ); |
| 38 | const hu = this.createChatBotMessage('akeel.zama@outlook.com'); |
| 39 | const emailuu = this.createChatBotMessage('& aquil@admisure.com') |
| 40 | this.updateChatbotState(f); |
| 41 | this.updateChatbotState(hu); |
| 42 | this.updateChatbotState(emailuu); |
| 43 | } |
| 44 | |
| 45 | faceUse = () => { |
| 46 | const fu = this.createChatBotMessage('I am from'); |
| 47 | const fuuu = this.createChatBotMessage('Kolkata, West Bengal'); |
| 48 | const ff = this.createChatBotMessage( |
| 49 | 'India', |
| 50 | ); |
| 51 | this.updateChatbotState(fu); |
| 52 | this.updateChatbotState(fuuu); |
| 53 | this.updateChatbotState(ff); |
| 54 | } |
| 55 | |
| 56 | colab = () => { |
| 57 | const cz = this.createChatBotMessage( |
| 58 | 'I have 4 social accounts', |
| 59 | ); |
| 60 | const cuf = this.createChatBotMessage('LinkedIn, Instagram, twitter, facebook which one you want to know'); |
nothing calls this directly
no test coverage detected