Files
FunguyBot/plugins/help.py
T
hash c2eda9ec79 Add documentation for Wikipedia and Time plugins
- Added documentation for Wikipedia plugin (!wp command) in help.py and README.md
- Added documentation for Time plugin (!time command) in help.py and README.md
- Updated help.py with detailed command descriptions for both plugins
- Updated README.md with usage examples for both plugins

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 23:28:17 -05:00

557 lines
28 KiB
Python

"""
Plugin for providing a command to display the list of available commands and their descriptions.
"""
import logging
import simplematrixbotlib as botlib
async def handle_command(room, message, bot, prefix, config):
"""
Function to handle the !help command.
Args:
room (Room): The Matrix room where the command was invoked.
message (RoomMessage): The message object containing the command.
bot (MatrixBot): The Matrix bot instance.
prefix (str): The command prefix.
config (dict): The bot's configuration.
Returns:
None
"""
match = botlib.MessageMatch(room, message, bot, prefix)
if match.is_not_from_this_bot() and match.prefix() and match.command("help"):
logging.info("Fetching command help documentation")
commands_message = """
<details><summary><strong>🍄 Funguy Bot Commands 🍄</strong></summary>
<p>
<details><summary>📖 <strong>!help</strong></summary>
<p>Displays comprehensive help documentation for all available commands with usage examples.</p>
</details>
<details><summary>🔌 <strong>!plugins</strong></summary>
<p>Lists all loaded plugins along with their descriptions in alphabetical order.</p>
</details>
<details><summary>🃏 <strong>!fortune</strong></summary>
<p>Returns a random fortune message. Executes the `/usr/games/fortune` utility and sends the output as a message to the chat room.</p>
</details>
<details><summary>⏰ <strong>!date</strong></summary>
<p>Displays the current date and time. Fetches the current date and time using Python's `datetime` module and sends it in a formatted message with proper ordinal suffixes to the chat room.</p>
</details>
<details><summary>💻 <strong>!proxy</strong></summary>
<p>Retrieves a tested/working random SOCKS5 proxy. Fetches a list of SOCKS5 proxies from public sources, tests their availability, and sends the first working proxy with latency information to the chat room. Caches working proxies for faster access.</p>
</details>
<details><summary>📶 <strong>!isup [domain/ip]</strong></summary>
<p>Checks if the specified domain or IP address is reachable. Performs DNS resolution and checks HTTP/HTTPS service availability. Reports successful DNS resolution and service status.</p>
</details>
<details><summary>☯ <strong>!karma [user]</strong></summary>
<p>Retrieves the karma points for the specified user. Retrieves the karma points for the specified user from a SQLite database and sends them as a message to the chat room.</p>
</details>
<details><summary>⇧ <strong>!karma [user] up</strong></summary>
<p>Increases the karma points for the specified user by 1. Increases the karma points for the specified user by 1 in the database and sends the updated points as a message to the chat room. Users cannot modify their own karma.</p>
</details>
<details><summary>⇩ <strong>!karma [user] down</strong></summary>
<p>Decreases the karma points for the specified user by 1. Decreases the karma points for the specified user by 1 in the database and sends the updated points as a message to the chat room. Users cannot modify their own karma.</p>
</details>
<details><summary>🌧️ <strong>!weather [location]</strong></summary>
<p>Fetches current weather information for any location using OpenWeatherMap API. Shows temperature (Celsius/Fahrenheit), conditions, humidity, wind speed, and weather emojis. Requires OPENWEATHER_API_KEY environment variable.</p>
</details>
<details><summary>📖 <strong>!ud [term] [index]</strong></summary>
<p>Fetches definitions from Urban Dictionary. Use without arguments for random definition, or specify term and optional index number. Shows definition, example, author, votes, and permalink.</p>
</details>
<details><summary>🔍 <strong>!dns [domain]</strong></summary>
<p>Performs comprehensive DNS reconnaissance on a domain. Queries multiple DNS record types including A, AAAA, MX, NS, TXT, CNAME, SOA, and SRV records. Validates domain format and provides formatted results.</p>
</details>
<details><summary>💰 <strong>!btc</strong></summary>
<p>Fetches the current Bitcoin price in USD from bitcointicker.co API. Shows real-time BTC/USD price with proper formatting. Includes error handling for API timeouts and data parsing issues.</p>
</details>
<details><summary>🌐 <strong>!whois &lt;domain/ip&gt;</strong></summary>
<p>Perform comprehensive WHOIS lookups for domains and IP addresses. Retrieves registrar information, registration dates, name servers, and contact details from WHOIS databases.</p>
<p><strong>Usage:</strong></p>
<ul>
<li><code>!whois &lt;domain&gt;</code> - Query domain registration information</li>
<li><code>!whois &lt;ip&gt;</code> - Query IP address allocation details</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!whois example.com</code></li>
<li><code>!whois google.com</code></li>
<li><code>!whois 8.8.8.8</code></li>
<li><code>!whois 1.1.1.1</code></li>
</ul>
<p><strong>Output includes:</strong> Domain/IP information, registrar, WHOIS server, creation/expiration dates, name servers, and contact details.</p>
</details>
<details><summary>🔍 <strong>!subdomains <domain></strong></summary>
<p>Enumerate subdomains using SSL certificate transparency logs. Discovers associated subdomains by querying the CertSpotter API for SSL certificates issued for a domain.</p>
<p><strong>Usage:</strong></p>
<ul>
<li><code>!subdomains <domain></code> - Enumerate subdomains for any domain</li>
<li><code>!subdomains example.com</code> - Example subdomain enumeration</li>
</ul>
<p><strong>Features:</strong></p>
<ul>
<li>Discovers subdomains through SSL certificate transparency logs</li>
<li>Uses the free CertSpotter API for enumeration</li>
<li>No rate limiting or API key required</li>
<li>Identifies subdomains through certificate SAN (Subject Alternative Name) enumeration</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!subdomains google.com</code></li>
<li><code>!subdomains github.com</code></li>
<li><code>!subdomains example.com</code></li>
</ul>
<p><em>Essential for reconnaissance and subdomain enumeration in penetration testing</em></p>
</details>
<details><summary>📍 <strong>!geo [ip/domain]</strong></summary>
<p>Perform IP geolocation lookups with detailed geographic information. Resolves domains to IP addresses and provides location data including country, region, city, coordinates, and ISP information.</p>
<p><strong>Usage:</strong></p>
<ul>
<li><code>!geo <ip_address></code> - Geolocate an IP address</li>
<li><code>!geo <domain></code> - Geolocate a domain (automatically resolves to IP)</li>
</ul>
<p><strong>Features:</strong></p>
<ul>
<li>Uses ip-api.com as primary geolocation service with ipapi.co fallback</li>
<li>Automatic domain to IP resolution</li>
<li>Comprehensive geographic information</li>
<li>No API key required for basic usage</li>
<li>Supports both IPv4 and IPv6 addresses</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!geo 8.8.8.8</code></li>
<li><code>!geo example.com</code></li>
<li><code>!geo google.com</code></li>
</ul>
<p><strong>Information provided:</strong></p>
<ul>
<li>Country and country code</li>
<li>Region/State</li>
<li>City</li>
<li>Postal code</li>
<li>Latitude/Longitude coordinates</li>
<li>Timezone</li>
<li>ISP/Organization</li>
<li>Autonomous System Number (ASN)</li>
</ul>
<p><em>Essential for network reconnaissance and IP investigation</em></p>
</details>
<details><summary>🔍 <strong>!shodan [command] [query]</strong></summary>
<p>Shodan.io integration for security reconnaissance and threat intelligence.</p>
<p><strong>Commands:</strong></p>
<ul>
<li><code>!shodan ip &lt;ip_address&gt;</code> - Detailed IP information (services, ports, banners)</li>
<li><code>!shodan search &lt;query&gt;</code> - Search Shodan database with filters</li>
<li><code>!shodan host &lt;domain&gt;</code> - Host information and subdomain enumeration</li>
<li><code>!shodan count &lt;query&gt;</code> - Count results with geographic/organization breakdown</li>
<li><code>!shodan test</code> - Test API connection and debug queries</li>
</ul>
<p><strong>Search Examples:</strong></p>
<ul>
<li><code>!shodan search apache</code></li>
<li><code>!shodan search "port:22 country:US"</code></li>
<li><code>!shodan search "product:nginx"</code></li>
<li><code>!shodan search "net:192.168.1.0/24"</code></li>
<li><code>!shodan search "http.title:'admin'"</code></li>
</ul>
<p><strong>Common Filters:</strong> country, city, port, product, os, org, net, has_ssl, http.title</p>
<p><em>Requires SHODAN_KEY environment variable</em></p>
</details>
<details><summary>🌐 <strong>!dnsdumpster [domain]</strong></summary>
<p>Comprehensive DNS reconnaissance and attack surface mapping using DNSDumpster.com API.</p>
<p><strong>Commands:</strong></p>
<ul>
<li><code>!dnsdumpster &lt;domain&gt;</code> - Complete DNS reconnaissance for any domain</li>
<li><code>!dnsdumpster test</code> - Test API connection and key validity</li>
</ul>
<p><strong>Features:</strong></p>
<ul>
<li>A Records - All IPv4 addresses with geographic and ASN information</li>
<li>NS Records - Complete name server information with IP locations</li>
<li>MX Records - All mail servers with geographic data</li>
<li>CNAME Records - Full alias chain mappings</li>
<li>TXT Records - All text records including SPF, DKIM, verification</li>
<li>Additional Records - AAAA, SRV, SOA, PTR records when available</li>
<li>Web Services - HTTP/HTTPS service detection with banner information</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!dnsdumpster google.com</code></li>
<li><code>!dnsdumpster github.com</code></li>
<li><code>!dnsdumpster example.com</code></li>
</ul>
<p><em>Requires DNSDUMPSTER_KEY environment variable</em><br>
<em>Rate Limit: 1 request per 2 seconds</em></p>
</details>
<details>
<summary><strong>💣 !exploitdb - Search Exploit Database</strong></summary>
<br>
<strong>Description:</strong><br>
Search Exploit-DB for security vulnerabilities and exploits. Returns detailed information about exploits including EDB-ID, type, platform, author, and direct links to exploit code.<br>
<br>
<strong>Usage:</strong><br>
<code>!exploitdb &lt;search_term&gt; [max_results]</code><br>
<br>
<strong>Parameters:</strong><br>
• <strong>search_term</strong> (required) - Software name, CVE number, or vulnerability type<br>
• <strong>max_results</strong> (optional) - Number of results to return (1-10, default: 5)<br>
<br>
<strong>Examples:</strong><br>
<code>!exploitdb wordpress</code> - Search for WordPress exploits<br>
<code>!exploitdb apache 3</code> - Get 3 Apache exploits<br>
<code>!exploitdb windows privilege escalation</code> - Search for Windows privesc<br>
<code>!exploitdb CVE-2021-44228</code> - Search by CVE number<br>
<code>!exploitdb linux kernel 10</code> - Get 10 Linux kernel exploits<br>
<code>!exploitdb sql injection</code> - Search for SQL injection exploits<br>
<br>
<strong>Output Includes:</strong><br>
• Exploit title and description<br>
• EDB-ID (Exploit Database ID)<br>
• Exploit type (webapps, local, remote, etc.)<br>
• Platform/OS (PHP, Linux, Windows, etc.)<br>
• Author name<br>
• Publication date<br>
• Direct link to full exploit code<br>
<br>
<strong>Notes:</strong><br>
• Searches the official Exploit-DB CSV database<br>
• May take a few seconds on first use (downloads database)<br>
• Falls back to search links if database unavailable<br>
<br>
<em>⚠️ Use responsibly and only on systems you have permission to test.</em>
</details>
<details><summary>🛡️ <strong>!headers &lt;url&gt;</strong></summary>
<p>Comprehensive HTTP security header analysis with security scoring and recommendations.</p>
<p><strong>Features:</strong></p>
<ul>
<li>Security scoring (0-100) with color-coded ratings</li>
<li>Critical security header validation and configuration checking</li>
<li>HTTP to HTTPS redirect chain analysis</li>
<li>SSL certificate information for HTTPS sites</li>
<li>Information disclosure header detection</li>
<li>Actionable security recommendations</li>
</ul>
<p><strong>Security Headers Analyzed:</strong></p>
<ul>
<li><code>Strict-Transport-Security</code> - HSTS enforcement</li>
<li><code>Content-Security-Policy</code> - XSS protection</li>
<li><code>X-Frame-Options</code> - Clickjacking protection</li>
<li><code>X-Content-Type-Options</code> - MIME sniffing prevention</li>
<li><code>Referrer-Policy</code> - Referrer control</li>
<li><code>Feature-Policy</code> - Browser feature restrictions</li>
<li>Server information headers</li>
</ul>
<p><strong>Security Ratings:</strong></p>
<ul>
<li>🟢 <strong>Excellent (80-100)</strong> - Strong configuration</li>
<li>🟡 <strong>Good (60-79)</strong> - Moderate, needs improvement</li>
<li>🟠 <strong>Fair (40-59)</strong> - Basic, significant improvements needed</li>
<li>🔴 <strong>Poor (0-39)</strong> - Weak configuration</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!headers example.com</code></li>
<li><code>!headers https://github.com</code></li>
<li><code>!headers localhost:3000</code></li>
<li><code>!headers subdomain.target.com</code></li>
</ul>
<p><em>Provides enterprise-grade security analysis for penetration testers and developers</em></p>
</details>
<details><summary>🔄 <strong>!hashid &lt;hash&gt;</strong></summary>
<p>Advanced hash type identification with confidence scoring and tool recommendations.</p>
<p><strong>Features:</strong></p>
<ul>
<li>100+ hash types including modern, legacy, and exotic algorithms</li>
<li>Color-coded confidence scoring (🟢 Very High to 🔴 Low)</li>
<li>Hashcat mode numbers and John the Ripper format names</li>
<li>Context-aware parsing for various hash formats</li>
</ul>
<p><strong>Supported Categories:</strong></p>
<ul>
<li><strong>Modern:</strong> yescrypt, scrypt, Argon2, bcrypt</li>
<li><strong>Unix/Linux:</strong> SHA-512/256 Crypt, MD5 Crypt, apr1</li>
<li><strong>Raw Hashes:</strong> MD5, SHA family, SHA-3, NTLM, LM</li>
<li><strong>Databases:</strong> MySQL, PostgreSQL, Oracle, MSSQL</li>
<li><strong>Web/CMS:</strong> WordPress, Drupal, phpBB3, Django</li>
<li><strong>LDAP:</strong> SSHA, SMD5, LDAP crypt formats</li>
<li><strong>Network:</strong> NetNTLMv1/v2, Kerberos</li>
<li><strong>Exotic:</strong> Whirlpool, RIPEMD, GOST, BLAKE2</li>
</ul>
<p><strong>Tool Integration:</strong></p>
<ul>
<li><strong>Hashcat:</strong> Mode numbers for <code>-m</code> parameter</li>
<li><strong>John:</strong> Format names for <code>--format=</code> parameter</li>
<li>Multi-tool compatibility</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!hashid 5d41402abc4b2a76b9719d911017c592</code> (MD5)</li>
<li><code>!hashid aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d</code> (SHA-1)</li>
<li><code>!hashid $6$rounds=5000$salt$hash...</code> (SHA-512 Crypt)</li>
<li><code>!hashid $y$j9T$...</code> (yescrypt - modern Linux)</li>
<li><code>!hashid 8846f7eaee8fb117ad06bdd830b7586c</code> (NTLM)</li>
<li><code>!hashid *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19</code> (MySQL)</li>
</ul>
<p><strong>Confidence Legend:</strong></p>
<ul>
<li>🟢 Very High (90-100%) - Single definitive match</li>
<li>🟡 High (80-89%) - Strong match with minor alternatives</li>
<li>🟠 Medium (60-79%) - Multiple plausible matches</li>
<li>🔴 Low (0-59%) - Uncertain, needs context</li>
</ul>
<p><em>Essential for penetration testers, forensic analysts, and password cracking</em></p>
</details>
<details><summary>🔐 <strong>!sslscan &lt;domain[:port]&gt;</strong></summary>
<p>Comprehensive SSL/TLS security scanning and analysis with vulnerability detection.</p>
<p><strong>Features:</strong></p>
<ul>
<li>TLS 1.0-1.3 protocol support testing with security scoring</li>
<li>Certificate chain validation, expiration, and signature analysis</li>
<li>25+ cipher suite testing with strength classification</li>
<li>Vulnerability detection (POODLE, weak ciphers, protocol issues)</li>
<li>0-100 security rating with color-coded assessment</li>
<li>PCI DSS and modern security standards compliance checking</li>
</ul>
<p><strong>Security Checks:</strong></p>
<ul>
<li><strong>Protocol Security:</strong> TLS 1.2/1.3 enforcement, insecure protocol detection</li>
<li><strong>Certificate Health:</strong> Expiration monitoring, signature validation</li>
<li><strong>Cipher Security:</strong> RC4, DES, 3DES, NULL cipher detection</li>
<li><strong>Modern Standards:</strong> Forward Secrecy, strong encryption</li>
</ul>
<p><strong>Security Ratings:</strong></p>
<ul>
<li>🟢 <strong>Excellent (90-100)</strong> - Modern TLS with strong security</li>
<li>🟡 <strong>Good (80-89)</strong> - Good security, minor improvements needed</li>
<li>🟠 <strong>Fair (60-79)</strong> - Moderate security, significant improvements</li>
<li>🔴 <strong>Poor (0-59)</strong> - Critical issues requiring immediate attention</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!sslscan example.com</code></li>
<li><code>!sslscan github.com:443</code></li>
<li><code>!sslscan localhost:8443</code></li>
<li><code>!sslscan 192.168.1.1:443</code></li>
</ul>
<p><em>Essential for security teams, system administrators, and developers ensuring TLS compliance</em><br>
<em>Note: SSLv2/SSLv3 testing limited by Python security features</em></p>
</details>
<details><summary>🎵 <strong>Last.fm Integration</strong></summary>
<p>Comprehensive Last.fm integration with 30+ commands for music analytics and social features.</p>
<p><strong>Commands:</strong></p>
<ul>
<li><code>!register <username></code> - Register your Last.fm username</li>
<li><code>!np [user]</code> - Show currently playing track</li>
<li><code>!recent [user] [limit]</code> - Show recent tracks (default 10, max 50)</li>
<li><code>!toptracks [user] [period]</code> - Show top tracks (overall/7day/1month/3month/6month/12month)</li>
<li><code>!topartists [user] [period]</code> - Show top artists</li>
<li><code>!topalbums [user] [period]</code> - Show top albums</li>
<li><code>!loved [user]</code> - Show recently loved tracks</li>
<li><code>!profile [user]</code> - Detailed user profile</li>
<li><code>!playcount [user]</code> - Total scrobbles</li>
<li><code>!scrobbles [user]</code> - Detailed scrobbling statistics</li>
<li><code>!compare <user1> <user2></code> - Compare musical tastes</li>
<li><code>!taste [user]</code> - Top artists with taste-o-meter</li>
<li><code>!friends [user]</code> - Show Last.fm friends</li>
<li><code>!recommend [user]</code> - Artist recommendations</li>
<li><code>!similar <artist></code> - Find similar artists</li>
<li><code>!tag <tag></code> - Top artists for a tag/genre</li>
<li><code>!charts</code> - Global top tracks chart</li>
<li><code>!tagcloud [user]</code> - Top genre tags</li>
<li><code>!now</code> - What are registered users playing?</li>
<li><code>!decades [user]</code> - Favorite decades analysis</li>
<li><code>!genres [user]</code> - Top genres/tags</li>
<li><code>!era <year></code> - Popular tracks from a year</li>
<li><code>!weekly [user]</code> - Weekly listening report</li>
<li><code>!monthly [user]</code> - Monthly listening report</li>
<li><code>!yearly [user] [year]</code> - Yearly listening report</li>
<li><code>!first <artist> [user]</code> - Find first scrobble of an artist</li>
<li><code>!concerts [user]</code> - Upcoming concerts for top artists</li>
<li><code>!radio <artist></code> - Generate playlist based on artist</li>
<li><code>!mashup <artist1> <artist2></code> - Musical connections between artists</li>
<li><code>!collage [user] [size]</code> - Top album art URLs</li>
<li><code>!listening [user]</code> - Currently listening with album art</li>
<li><code>!awards [user]</code> - Milestone achievements</li>
</ul>
<p><strong>Features:</strong></p>
<ul>
<li>Register your Matrix ID with your Last.fm username</li>
<li>Display currently playing tracks with artist and album information</li>
<li>Compare musical tastes between users</li>
<li>Discover similar artists and genres</li>
<li>Get personalized artist recommendations</li>
<li>View detailed listening statistics and reports</li>
<li>Find upcoming concerts for your favorite artists</li>
<li>Generate playlists based on your musical preferences</li>
<li>View milestone achievements and listening habits</li>
<li>Uses SQLite database to store user associations</li>
<li>Requires LASTFM_API_KEY environment variable</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!register your_lastfm_username</code> - Register your Last.fm username</li>
<li><code>!np</code> - Show your currently playing track</li>
<li><code>!recent 20</code> - Show your 20 most recent tracks</li>
<li><code>!topartists 7day</code> - Show your top artists from the last 7 days</li>
<li><code>!compare user1 user2</code> - Compare musical tastes between two users</li>
<li><code>!similar radiohead</code> - Find artists similar to Radiohead</li>
<li><code>!tag electronic</code> - Show top electronic artists</li>
<li><code>!era 1994</code> - Show popular tracks from 1994</li>
<li><code>!radio metallica</code> - Generate a playlist based on Metallica</li>
<li><code>!mashup metallica megadeth</code> - Find musical connections between Metallica and Megadeth</li>
</ul>
<p><strong>Requirements:</strong></p>
<li>Last.fm account at last.fm</li>
<li>LASTFM_API_KEY in .env file</li>
<li>YOUTUBE_API_KEY in .env file (for YouTube integration)</li>
</ul>
</details>
<details><summary>📸 <strong>!sd [prompt]</strong></summary>
<p>Generates images using self-hosted Stable Diffusion. Supports options: --steps, --cfg, --h, --w, --neg, --sampler. Uses queuing system to handle multiple requests. See available options using just '!sd'.</p>
</details>
<details><summary>📄 <strong>!text [prompt]</strong></summary>
<p>Generates text using the Infermatic AI API. Supports multiple models, configurable parameters, and model listing. Uses queuing system for sequential processing.</p>
<p><strong>Usage:</strong></p>
<ul>
<li><code>!text &lt;prompt&gt;</code> - Generate text using the default model</li>
<li><code>!text --list-models</code> - List all available models from Infermatic AI</li>
<li><code>!text --use-model &lt;model_name&gt; &lt;prompt&gt;</code> - Use a specific model instead of the default</li>
<li><code>!text --temperature &lt;value&gt; &lt;prompt&gt;</code> - Set temperature (0.0-1.0, default: 0.9)</li>
<li><code>!text --max-tokens &lt;value&gt; &lt;prompt&gt;</code> - Set maximum tokens to generate (default: 2048)</li>
</ul>
<p><strong>Configuration:</strong></p>
<ul>
<li>Requires <code>INFERMATIC_API</code> environment variable set to your API key</li>
<li>Requires <code>INFERMATIC_MODEL</code> environment variable for default model (default: Sao10K-L3.1-70B-Hanami-x1)</li>
</ul>
<p><strong>Model Management:</strong></p>
<ul>
<li>Use <code>!text --list-models</code> to see all available models</li>
<li>Models support different capabilities and context lengths</li>
<li>Costs and token limits vary by model</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><code>!text write a python function to calculate fibonacci</code></li>
<li><code>!text --list-models</code></li>
<li><code>!text --use-model llama-v3-8b-instruct explain quantum computing</code></li>
<li><code>!text --temperature 0.7 --max-tokens 500 write a haiku about AI</code></li>
</ul>
</details>
<details><summary>📰 <strong>!xkcd</strong></summary>
<p>Fetches and displays a random XKCD comic. Downloads comic image and sends it directly to the chat room.</p>
</details>
<details><summary>🎬 <strong>YouTube Features</strong></summary>
<p>Automatic preview when YouTube links are posted. Shows video info, description, and attempts to fetch lyrics. Also supports !yt [search terms] for direct YouTube searching.</p>
</details>
<details><summary>⏱️ <strong>!cron [add|remove] [room_id] [cron_entry] [command]</strong></summary>
<p>Schedule automated commands using cron syntax. Add or remove cron jobs for specific rooms and commands.</p>
</details>
<details><summary>🔧 <strong>Admin Commands</strong></summary>
<p>
<strong>!set [option] [value]</strong> - Set configuration options (admin_user, prefix)<br>
<strong>!get [option]</strong> - Get configuration values<br>
<strong>!saveconf</strong> - Save current configuration<br>
<strong>!loadconf</strong> - Load saved configuration<br>
<strong>!show</strong> - Display current configuration<br>
<strong>!reset</strong> - Reset configuration to defaults<br>
<strong>!load [plugin]</strong> - Load a plugin<br>
<strong>!unload [plugin]</strong> - Unload a plugin<br>
<strong>!reload</strong> - Reload all plugins<br>
<strong>!disable [plugin] [room_id]</strong> - Disable a plugin for specific room<br>
<strong>!enable [plugin] [room_id]</strong> - Enable a plugin for specific room<br>
<strong>!rehash</strong> - Reload configuration<br>
<em>Note: Admin commands require admin_user privileges</em>
</p>
</details>
</p>
</details>
<details><summary>📘 <strong>!wp <search term></strong></summary>
<p>Fetches Wikipedia summaries and main images for search terms using MediaWiki APIs. No HTML scraping or BeautifulSoup required.<br>
<strong>Usage:</strong><br>
<code>!wp <search term></code> - Fetch Wikipedia summary for any search term<br>
<code>!wp help</code> - Show usage instructions<br>
<br>
<strong>Examples:</strong><br>
<code>!wp artificial intelligence</code><br>
<code>!wp machine learning</code><br>
<code>!wp python programming</code>
</p>
</details>
<details><summary>📘 <strong>!time [location]</strong></summary>
<p>Fetches current time information for locations using the TimeAPI.io service.<br>
<strong>Usage:</strong><br>
<code>!time <location></code> - Get time for a location<br>
<code>!time help</code> - Show usage instructions<br>
<br>
<strong>Examples:</strong><br>
<code>!time London</code> - Get time in London<br>
<code>!time Tokyo</code> - Get time in Tokyo<br>
<code>!time New York</code> - Get time in New York<br>
<br>
<strong>Supported locations:</strong> Major cities worldwide including New York, London, Tokyo, Sydney, Paris, Berlin, etc.
</p>
</details>
<details><summary><strong>🤖 Funguy Bot AI Commands</strong></summary>
<p>
<strong>Creative & Writing</strong>: !write, !script, !author, !poem, !rap, !story, !comic, !motiv, !debate, !crit, !litcrit<br>
<strong>Technical</strong>: !tech, !dev, !py, !php, !regex, !math, !web, !it, !security, !ai, !ml, !data, !game, !gaming<br>
<strong>Professional</strong>: !seo, !recruit, !coach, !devrel, !sales, !ceo, !mgmt, !startup, !invest, !fin, !acad<br>
<strong>Educational</strong>: !tutor, !teach, !edu, !hist, !astro, !chem, !psych, !meditate, !socrat, !philos<br>
<strong>Lifestyle</strong>: !fit, !health, !diet, !cook, !travel, !art, !music, !film, !selfhelp<br>
<strong>Specialized</strong>: !legal, !medical, !realest, !auto, !fashion, !design, !interior, !florist<br>
<strong>Communication</strong>: !pron, !spk, !speak, !eloc, !comm, !msg, !langdet<br>
<strong>Business</strong>: !eth, !browse, !search, !create, !review, !curation, !domain<br>
<strong>Entertainment</strong>: !char, !adv, !advgame, !esc, !title, !stats, !prompt<br>
<strong>Technical Specialties</strong>: !intv, !plag, !trv, !foot, !rel, !etymo, !magic, !counsel, !behavior, !mh, !log, !dental, !acc, !chef, !tea, !telemed, !law, !trans, !chess, !time, !dream, !r, !emergency, !worksheet, !test, !create, !guide, !diag, !therapy, !gen, !drunk, !rec, !techtrans, !proof, !spirit, !friend, !chat, !wiki, !kanji, !note, !enhance, !nav, !hypno, !critic, !comp, !journo, !pscoach, !makeup, !childcare, !writing, !syn, !shop, !dining<br>
<em>Each AI command uses specialized prompts optimized for different domains and interfaces with local AI models. Consult ai.json</em>
</p>
</details>
<details><summary>🌟 <strong>Funguy Bot Credits</strong></summary>
<p>
<strong>🧙‍♂️ Creator & Developer</strong>: HB is the author of 🍄Funguy Bot🍄. (@hashborgir:mozilla.org)<br>
<strong>🚀 Development Context</strong>: Created during recovery from two-level cervical spinal surgery (CDA Cervical Discectomy and Disc Arthroplasty)<br>
<br>
<strong>Join our Matrix Room</strong>: <a href="https://matrix.to/#/#selfhosting:mozilla.org">Self-hosting | Security | Sysadmin | Homelab | Programming</a>
</p>
</details>
"""
await bot.api.send_markdown_message(room.room_id, commands_message)
logging.info("Sent help documentation to the room")