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