chatterbot now logs access times and errors whenever it accesses the Monastery anyway, see pm server stats. Useful to see if the monastery is having more technical issues than usual. (There might be a bug pertaining to actually logging the errors encountered, still working on it).

Thanks to chatterbot, chat has now all the tools needed to resolve any intellectual conflict 😉:

CommandWhat does it do
!coin Flips a coin ("heads" or "tails")
!d6 Rolls a standard six sided die for those complicated multiple choice questions.
!d20 Rolls a 20 sided D&D die. Attack, defense, extra-complicated multiple choice forms, you name it.
!8ball Simulated Magic 8 Ball. Can answer any yes/no question.

Answers to this commands include a fake ID, so chatterbot can post the same answer multiple times consecutively. For example, when multiple coin tosses are requested in short order in a "best out of three" solution. Just ignore the ID.

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Also check out my sisters artwork and my weekly webcomics

Replies are listed 'Best First'.
Re: Chatterbot update
by Corion (Patriarch) on Aug 23, 2024 at 10:02 UTC

    You can put the ID into HTML comments (<!-- SimID:abcdef -->) to hide it from the visible output.

      Whats wrong on this coding
      #!/usr/bin/perl use strict; use warnings; use XML::LibXML; # Define file paths my $input_file = '1.xml'; my $output_file = '3.xml'; # Create a new XML::LibXML object my $parser = XML::LibXML->new; # Parse the input XML file my $doc = $parser->parse_file($input_file); # Example transformation: let's say we want to add an attribute to the + root element my $root = $doc->documentElement(); $root->setAttribute('newAttribute', 'newValue'); # Example transformation: change the value of an element foreach my $node ($doc->findnodes('//someElement')) { $node->removeChildNodes(); $node->appendText('New Value'); } # Save the transformed XML to the output file $doc->toFile($output_file); print "Transformation complete. Output saved to $output_file\n";
Re: Chatterbot update
by Discipulus (Canon) on Aug 23, 2024 at 10:48 UTC
    Hello cavac and thanks!

    I officially and shamelessy suggest you to use my Games::Dice::Roller to allow even funnier dice expressions :)

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Chatterbot update
by Ratazong (Monsignor) on Aug 23, 2024 at 11:10 UTC

    Nice :-)

    But how can I flip a coin more than once? The second time I try I get the following error-message: Whoa, Cowboy! You said that already. Don't 'reload'?

    have a great day, Rata

      Just tested: you can append a unique ID.

      [hippo]: !coin a [hippo]: !coin b [chatterbot]: Coin flip (SimID:3ZEfC) result: heads [chatterbot]: Coin flip (SimID:SW3DD) result: tails

      🦛

Re: Chatterbot update
by pryrt (Abbot) on Aug 23, 2024 at 13:30 UTC
    Don't forget to add that table to the list of other commands at ChatterBox FAQ#chatterbot. And, if you don't want to duplicate that help information on chatterbot's user-page, could you at least include that link to the FAQ from the user-page?

    Since I was reminded of the private interface, I did verify that I can roll a die via /msg chatterbot d6 as well.

    And why not allow !d4 or !d8 or !d100 or even stranger dice... That is, do a pattern match for m/!d(\d+)/ and roll the appropriate $1-sided die. Not all conflicts can be resolved with 2, 6, or 20 choices. ;-) A !d1 would definitely require your <!-- id -->. And I'm curious what you'd choose to reply to a !d0