""" 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 = """
🍄 Funguy Bot Commands 🍄

🃏 !fortune

Returns a random fortune message. Executes the `/usr/games/fortune` utility and sends the output as a message to the chat room.

!date

Displays the current date and time. Fetches the current date and time using Python's `datetime` module and sends it in a formatted message to the chat room.

💻 !proxy

Retrieves a tested/working random SOCKS5 proxy. Fetches a list of SOCKS5 proxies, tests their availability, and sends the first working proxy to the chat room.

📶 !isup [domain/ip]

Checks if the specified domain or IP address is reachable. Checks if the specified domain or IP address is reachable by attempting to ping it. If DNS resolution is successful, it checks HTTP and HTTPS service availability by sending requests to the domain.

!karma [user]

Retrieves the karma points for the specified user. Retrieves the karma points for the specified user from a database and sends them as a message to the chat room.

!karma [user] up

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.

!karma [user] down

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.

📸 !sd [prompt]

Generates images using self-hosted Stable Diffusion. See available options using just '!sd'.

💡 !enable

Enables a disabled command. Use '!enable plugin room' to enable a specific command.

🚫 !disable

Disables a command. Use '!disable plugin room' to disable a specific command.

🌟 Funguy Bot Credits 🌟

🧙‍♂️ Creator & Developer: Hash Borgir is the author of 🍄Funguy Bot🍄. (@hashborgir:mozilla.org)

Join our Matrix Room: [Self-hosting | Security | Sysadmin | Homelab | Programming](https://matrix.to/#/#selfhosting:mozilla.org)


📸 Funguy Bot AI Commands 🌟

!tech, !music, !eth, !seo, !eng, !intv, !pron, !spk, !trv, !plag, !char, !adv, !story, !foot, !comic, !motiv, !debate, !write, !script, !author, !crit, !rel, !poem, !rap, !speak, !phil, !math, !tutor, !design, !sec, !recruit, !coach, !etymo, !com, !magic, !counsel, !behavior, !fit, !mh, !realest, !log, !dental, !web, !health, !acc, !chef, !auto, !art, !fin, !invest, !tea, !interior, !florist, !selfhelp, !gnome, !aph, !adv, !advgame, !esc, !title, !stats, !prompt, !teach, !diet, !psych, !domain, !tech, !review, !devrel, !acad, !arch, !insane, !manip, !logic, !review, !diy, !influencer, !philos, !socrat, !edu, !meditate, !writer, !smm, !eloc, !viz, !nav, !hypno, !hist, !astro, !critic, !comp, !journo, !curation, !pscoach, !makeup, !childcare, !writing, !art, !py, !syn, !shop, !dining, !telemed, !cook, !law, !fashion, !ml, !trans, !design, !it, !chess, !prompt, !dev, !math, !regex, !time, !dream, !coach, !r, !comm, !trans, !php, !emergency, !worksheet, !test, !game, !security, !create, !browse, !dev, !search, !startup, !guide, !langdet, !sales, !msg, !ceo, !diag, !coach, !therapy, !legal, !gen, !mgmt, !drunk, !hist, !rec, !write, !techtrans, !ai, !game, !proof, !spirit, !spirit, !chem, !friend, !py, !chat, !wiki, !kanji, !note, !litcrit, !enhance, !travel, !data, !gaming

""" await bot.api.send_markdown_message(room.room_id, commands_message) logging.info("Sent help documentation to the room")