Скачать открытый исходный код бота Либре общий выпуск и установите бот Libre на свой собственный сервер
Bot Libre Forum : Sending message via email

RE: Sending message via email

по admin опубликовано Dec 29 2016, 16:49

You could use something like,

pattern "leave a message" template "What is your message?";
pattern "*" that "What is your message?" answer sendEmail();

function sendEmail() {
 Email.email("[email protected]", "Message", sentence);
 return "Email sent";

For Facebook, I don't think this information is available from the Facebook API.

by webdesigncornwall posted Dec 29 2016, 18:15
I am going to try this later tonight. i am analytical though so i have to ask where does sentence variable come from? and also would it be possible for me to collect multiple "messages" and concat them into one message var to pass to email.Email?

Thumbs up: 1, thumbs down: 0, stars: 5.0
Views: 922, today: 0, week: 15, month: 24

by admin posted Dec 29 2016, 20:57
There are a few global variables available in scripts.
  • input - the input object
  • sentence - the input sentence
  • speaker - the input speaker/user
  • conversation - the current conversation

Updated: Dec 29 2016, 20:57
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 844, today: 0, week: 16, month: 20

Идентификатор: 15043232
Опубликовано: Dec 29 2016, 16:49
Ответы: 2
Вид: 1021, сегодня: 1, неделю: 16, месяц: 21
Я уверен, что
Вывесить флаг как оскорбительное, или в нарушение правил сайта