Forum teuk.org

πŸͺ„ Wingardium Leviosa! β€” Mediabot v3 Feature Wave V (May 2026)

in Mediabot Β· started by TeuK Β· 3d ago

TeuK Β· 3d ago

Overview

Ten more spells, and the bot keeps rising. Wave V brings trivia contests, Morse code, word games, analytics depth, dictionary lookups, and two new Partyline tools β€” all production-ready, all tested, all wired.

β€œWingardium Leviosa! The feature list ascends. There is no ceiling.” βœ¨πŸš€


🎯 !trivia / !triviascore β€” Channel Quiz

<teuk> m trivia
<mediabotv3> Trivia (Science & Nature): What is the chemical symbol for Gold?
<mediabotv3> Choices: [Fe]  [Au]  [Ag]  [Cu] -- reply with !answer <choice> or just say it (30s)

<Boole> Au
<mediabotv3> Correct, Boole! The answer was: Au  (score: 3)

<teuk> m triviascore
<mediabotv3> Trivia scores on #boulets: Boole:3, teuk:1, Poyan:1

Fetches one multiple-choice question from Open Trivia DB (opentdb.com/api.php). Checks every public message for the correct answer (hooked into on_message_PRIVMSG). 30-second timeout per question. Scores are in-memory per channel, per session.


πŸ”€ !choose <a> | <b> | <c> β€” Random Choice

<teuk> m choose pizza | sushi | ramen
<mediabotv3> teuk: I choose... sushi!

Split on |, rand(), one line. At least 2 options required.


πŸ“‘ !morse <text> β€” Morse Encoder

<teuk> m morse SOS
<mediabotv3> ... --- ...

<teuk> m morse hello world
<mediabotv3> .... . .-.. .-.. ---  /  .-- --- .-. .-.. -..

Full A–Z, 0–9 table. Words separated by /. Input limited to 80 chars, output truncated at 400. No external dependency.


πŸ”€ !abbrev <text> β€” Acronym Generator

<teuk> m abbrev Pour L'Amour Du Risque
<mediabotv3> teuk: PLADR

<Boole> m abbrev as soon as possible
<mediabotv3> Boole: ASAP

Takes the first letter of each word, uppercased. Pure string manipulation.


βš”οΈ !compare <nick1> <nick2> β€” Message Duel

<teuk> m compare teuk Boole
<mediabotv3> teuk: 1247 msg(s) | Boole: 312 msg(s) | teuk leads by 935 msg(s)

<teuk> m compare Poyan Boole
<mediabotv3> Poyan: 844 msg(s) | Boole: 312 msg(s) | Poyan leads by 532 msg(s)

Queries CHANNEL_LOG for both nicks in one IN (?, ?) call, computes the delta, announces the leader.


🌑️ !heatmap [nick] β€” Hourly Activity Chart

<teuk> m heatmap teuk
<mediabotv3> teuk activity by hour on #boulets:
<mediabotv3>   00-05  β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   12 msgs
<mediabotv3>   06-11  β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘  187 msgs
<mediabotv3>   12-17  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  412 msgs
<mediabotv3>   18-23  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘  341 msgs

Groups CHANNEL_LOG by HOUR(ts) into four 6-hour blocks, renders a 10-char ASCII bar using Unicode block characters (β–ˆ / β–‘).


πŸ“… !monthstats [nick] β€” Monthly Activity

<teuk> m monthstats teuk
<mediabotv3> teuk on #boulets (last 12 months): 2025-06:312  2025-07:289  2025-08:401  ...

DATE_FORMAT(ts, '%Y-%m') grouped by month, last 12 months only. One line output β€” compact and scannable.


πŸ“– !define <word> β€” Dictionary

<teuk> m define serendipity
<mediabotv3> serendipity: An unsought, unintentional, and/or unexpected, yet
             fortunate discovery and/or learning experience that happens by accident.

Queries Wiktionary REST API (en.wiktionary.org/api/rest_v1/page/definition/<word>). Strips HTML tags, truncates at 300 chars. Falls back gracefully if the word is not found or the API is unreachable.


⚑ Partyline .karma <nick> [#chan]

.karma Boole #boulets
Boole on #boulets: karma +7

Reads the KARMA table directly from the Partyline. Channel defaults to the first joined channel if not specified.


πŸ”„ Partyline .reload β€” Reload Configuration

.reload
Configuration reloaded.

Calls $bot->{conf}->load() to re-read mediabot.conf without restarting the bot. Owner-only.


πŸ“¦ Files Changed

File Changes
UserCommands.pm mbChoose_ctx, mbMorse_ctx, mbAbbrev_ctx, mbCompare_ctx, mbHeatmap_ctx, mbMonthStats_ctx, mbDefine_ctx, mbTrivia_ctx, mbTriviaScore_ctx, checkTriviaAnswer
Partyline.pm _cmd_karma, _cmd_reload + dispatch + help
Mediabot.pm dispatch for all new commands
mediabot.pl checkTriviaAnswer hook in on_message_PRIVMSG

You must be logged in to reply.