Bot::B...Infobot(3pm)

πŸ“¦
version 1.30 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Bot::BasicBot::Pluggable::Module::Infobot β€” bestie, it's an infobot clone redone in B::B::P. That's the whole thing. The page you're reading is Bot::B...Infobot(3pm) from the User Contributed Perl Documentation, and yes the abbreviated title is doing the absolute most πŸŽ€


✨ VERSION ✨

version 1.30 β€” that's her. that's the version. no notes πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so this module does infobot things β€” basically it remembers factoids and returns them. iconic behavior fr fr.

If you want, it will go ask another infobot about factoids that it doesn't know about. Like, it'll network for you. Queen shit.

And because of persistent heckling from the peanut gallery, it does things pretty much exactly like the classic infobot, even when those things aren't necessarily that useful β€” for example, saying "Okay." rather than "OK, water is wet." 😭 so if you were expecting helpful energy, adjust your expectations accordingly.

More infobot backwards compatibility is available through additional packages such as Bot::BasicBot::Pluggable::Module::Foldoc. ✨


🌈 IRC USAGE 🌈

The following examples assume you're running Infobot with its defaults settings, which require the bot to be addressed before learning factoids or answering queries. Modify these settings with the Vars below (scroll down, they're cute).

<user> bot: water is wet.
 <bot> user: okay.
<user> bot: water?
 <bot> user: water is wet.
<user> bot: water is also blue.
 <bot> user: okay.
<user> bot: water?
 <bot> user: water is wet or blue.
<user> bot: no, water is translucent.
 <bot> user: okay.
<user> bot: water?
 <bot> user: water is translucent.
<user> bot: forget water.
 <bot> user: I forgot about water.
<user> bot: water?
 <bot> user: No clue. Sorry.

🧚 the <reply> thing 🧚

A fact that begins with <reply> will have the <noun> is stripped. the way that it just deletes grammar?? obsessed.

<user> bot: what happen is <reply>somebody set us up the bomb.
 <bot> user: okay.
<user> bot: what happen?
 <bot> user: somebody set us up the bomb.

πŸŽ€ the <action> thing πŸŽ€

A fact that begins <action> will be emoted as a response. she's dramatic, she's physical comedy, she's the moment.

<user> bot: be funny is <action>dances silly.
 <bot> user: okay.
<user> bot: be funny?
   * bot dances silly.

πŸ“ pipes = random answers πŸ“

Pipes ("|") indicate different possible answers, picked at random. it's giving chaos, it's giving dice, it's giving slay.

<user> bot: dice is one|two|three|four|five|six
 <bot> user: okay.
<user> bot: dice?
 <bot> user: two.
<user> bot: dice?
 <bot> user: four.

πŸ’œ RSS feeds as responses πŸ’œ

You can also use RSS feeds as a response:

<user> bot: jerakeen.org is <rss="http://jerakeen.org/rss">.
 <bot> user: okay.
<user> bot: jerakeen.org?
 <bot> user: jerakeen.org is <item>; <item>; etc....

πŸ‘‘ learn from another bot πŸ‘‘

You can also ask the bot to learn a factoid from another bot, as follows:

<user> bot: ask bot2 about fact.
 <bot> user: asking bot2 about fact...
<user> bot: fact?
 <bot> user: fact is very boring.

πŸ”₯ privmsg searching πŸ”₯

Finally, you can privmsg the bot to search for particular facts:

<user> search for options.
 <bot> I know about 'options indexes', 'charsetoptions override', etc....

πŸ’« METHODS πŸ’«

this section is literally empty in the original. No methods listed. Nothing. A void. A little mystery for you to ponder πŸ’€ keep scrolling bestie, the Vars are where the good stuff is.


🌸 VARS 🌸

All of these are configurable via the Vars module, i.e. they have a "user_" prefix in the store. noted. remembered. no cap.

  • min_length β€” Defaults to 3; the minimum length a factoid, or inquiry, must be before recognizing it. Too smol? ignored.
  • max_length β€” Defaults to 25; the maximum length a factoid, or inquiry, can be before ignoring it. Too much? also ignored. balance, bestie.
  • num_results β€” Defaults to 20; the number of facts to return for "search for <term>" privmsg.
  • passive_answer β€” Defaults to 0; when enabled, the bot will answer factoids without being addressed. she just pipes up. unprompted. main character energy.
  • passive_learn β€” Defaults to 0; when enabled, the bot will learn factoids without being addressed. absorbing information uninvited 😭
  • require_question β€” Defaults to 1; determines whether the bot requires a question mark before responding to a factoid. When enabled, the question mark is required (ie. "water?"). When disabled, the question mark is entirely optional (ie. "water" would also produce a response).
  • stopwords β€” A comma-, space-, or pipe- separated list of words the bot should not learn or answer. This prevents such insanity as the learning of "where is the store?" and "how is your mother?" The default list of stopwords contains "here", "how", "it", "something", "that", "this", "what", "when", "where", "which", "who" and "why").
  • unknown_responses β€” A pipe-separated list of responses the bot will randomly choose from when it doesn't know the answer to a question. The default list of response contains "Dunno.", "I give up.", "I have no idea.", "No clue. Sorry.", "Search me, bub.", and "Sorry, I don't know."
  • allow_searching β€” Defaults to 0. Searching on large factoid lists is ... problematic. that's the whole warning. take it or leave it πŸ’€
  • http_timeout β€” Time in seconds for an http request to timeout. When this value is set to a very high value, a slow site can disconnect a bot by blocking it. Defaults to 10.
  • rss_items β€” Maximal numbers of items returns when using RSS feeds. Defaults to 5.
  • can_newline β€” Allow newlines in factoids with \n (\\n is then needed for a literal backslash-n).
  • escape_pipes β€” Allow pipes in factoids with \| (otherwise they separate random items; see IRC USAGE above).

πŸ’€ BUGS πŸ’€

not the bugs section. every single one of these is real and I need you to know it.

  • "is also" doesn't work on <reply>s (ie. "<bot> cheetahs! or <reply>monkies.")
  • "is also" doesn't work on <action>s (same as the previous bug, hobo.)
  • The pipe syntax for random replies doesn't actually work. At all. Um.
  • We should probably make a "choose_random_response" function.
  • "<bot>?" fails, due to removal of <bot> name from $mess->body.
  • "ask" syntax doesn't work in a private message.
  • The tab stops are set to 2, not 4. OHMYGOD.
  • If a "search" fails, the bot doesn't tell you.
  • "search" is case-sensitive.
  • If Title module is loaded, <rss> factoids don't work cos of told/fallback.

🫢 REQUIREMENTS 🫢

  • URI
  • LWP::Simple
  • XML::Feed

⭐ AUTHOR ⭐

Mario Domgoergen <mdom@cpan.org>

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page bestie πŸŽ€ this was Bot::B...Infobot(3pm), brought to you by perl v5.40.0, dated 2024-08-24. go forth and teach your bot that water is wet. or blue. or translucent. depending on the last thing anyone said. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from