AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

How to store a question if no reply exists

In Perl how to store a question for a later analysis if there is no reply for that question. Is there anyway to implement logging of such questions


  [ # 1 ]

Hi Rahul

Something like this may work:

my $reply $bot->reply($username$message);
if (
$bot->lastMatch($usernameeq '*'{
# they got the wildcard trigger, so it wasn't a match
    # log it however you want, this appends it to a file.
open (my $log">>""missed triggers.txt");
{$log} "Message: $message\n";
close ($log);

  login or register to react