Help plugin reformat HTML

This commit is contained in:
Hash Borgir 2024-02-17 17:48:46 -07:00
parent c996168543
commit eb81f7aa67

View File

@ -21,51 +21,52 @@ async def handle_command(room, message, bot, prefix, config):
match = botlib.MessageMatch(room, message, bot, prefix) match = botlib.MessageMatch(room, message, bot, prefix)
if match.is_not_from_this_bot() and match.prefix() and match.command("help"): if match.is_not_from_this_bot() and match.prefix() and match.command("help"):
logging.info("Fetching command help documentation") logging.info("Fetching command help documentation")
commands_message = """<details><summary><strong>🍄Funguy Bot Commands🍄<br>⤵Click Here To See Help Text⤵</strong></summary> commands_message = """
<br> <details><summary><strong>🍄Funguy Bot Commands🍄<br>Click Here To See Help Text</strong></summary>
<br>🃏 **!fortune** <p>
<br>Returns a random fortune message. <details><summary>🃏 <strong>!fortune</strong></summary>
<br>Executes the `/usr/games/fortune` utility and sends the output as a message to the chat room. <p>Returns a random fortune message. Executes the `/usr/games/fortune` utility and sends the output as a message to the chat room.</p>
<br> </details>
<br> **!date**
<br>Displays the current date and time. <details><summary> <strong>!date</strong></summary>
<br>Fetches the current date and time using Python's `datetime` module and sends it in a formatted message to the chat room. <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 to the chat room.</p>
<br> </details>
<br>💻 **!proxy**
<br>Retrieves a tested/working random SOCKS5 proxy. <details><summary>💻 <strong>!proxy</strong></summary>
<br>Fetches a list of SOCKS5 proxies, tests their availability, and sends the first working proxy to the chat room. <p>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.</p>
<br> </details>
<br>📶 **!isup [domain/ip]**
<br>Checks if the specified domain or IP address is reachable. <details><summary>📶 <strong>!isup [domain/ip]</strong></summary>
<br>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. <p>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.</p>
<br> </details>
<br> **!karma [user]**
<br>Retrieves the karma points for the specified user. <details><summary> <strong>!karma [user]</strong></summary>
<br>Retrieves the karma points for the specified user from a database and sends them as a message to the chat room. <p>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.</p>
<br> </details>
<br> **!karma [user] up**
<br>Increases the karma points for the specified user by 1. <details><summary> <strong>!karma [user] up</strong></summary>
<br>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. <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.</p>
<br> </details>
<br> **!karma [user] down**
<br>Decreases the karma points for the specified user by 1. <details><summary> <strong>!karma [user] down</strong></summary>
<br>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. <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.</p>
<br> </details>
<br>📄 **!funguy [prompt]
<br>An AI large language model designed to serve as a chatbot within a vibrant and diverse community chat room hosted on the Matrix platform. <details><summary>📄 <strong>!funguy [prompt]</strong></summary>
<br>(Currently loaded model: **TheBloke_Mistral-7B-Instruct-v0.2-GPTQ** <p>An AI large language model designed to serve as a chatbot within a vibrant and diverse community chat room hosted on the Matrix platform. (Currently loaded model: <strong>TheBloke_Mistral-7B-Instruct-v0.2-GPTQ</strong>)</p>
<br> </details>
<br>🎝 **!music [prompt]**
<br>Your music expert! Try it out. <details><summary>🎝 <strong>!music [prompt]</strong></summary>
<br> 🌟 Funguy Bot Credits 🌟 <p>Your music expert! Try it out.</p>
<br> </details>
<br>🧙 Creator & Developer:
<br> Hash Borgir is the author of 🍄Funguy Bot🍄. (@hashborgir:mozilla.org) <details><summary>🌟 <strong>Funguy Bot Credits</strong> 🌟</summary>
<br> <p>🧙 Creator & Developer: Hash Borgir is the author of 🍄Funguy Bot🍄. (@hashborgir:mozilla.org)</p>
<br> Join our Matrix Room: <p>Join our Matrix Room: [Self-hosting | Security | Sysadmin | Homelab | Programming](https://matrix.to/#/#selfhosting:mozilla.org)</p>
<br> </details>
<br>[Self-hosting | Security | Sysadmin | Homelab | Programming](https://matrix.to/#/#selfhosting:mozilla.org) </p>
<br> </details>
<br></details>""" """
await bot.api.send_markdown_message(room.room_id, commands_message) await bot.api.send_markdown_message(room.room_id, commands_message)
logging.info("Sent help documentation to the room") logging.info("Sent help documentation to the room")