Refactor help plugin, and included metadata to all plugins
This commit is contained in:
@@ -24,3 +24,18 @@ async def handle_command(room, message, bot, prefix, config):
|
||||
fortune_output = "🃏 " + subprocess.run(['/usr/games/fortune'], capture_output=True).stdout.decode('UTF-8')
|
||||
await bot.api.send_markdown_message(room.room_id, fortune_output)
|
||||
logging.info("Sent fortune to the room")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Plugin Metadata
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
__version__ = "1.0.0"
|
||||
__author__ = "Funguy Bot"
|
||||
__description__ = "Random fortune message"
|
||||
__help__ = """
|
||||
<details>
|
||||
<summary><strong>!fortune</strong> – Random fortune</summary>
|
||||
<p>Runs the <code>/usr/games/fortune</code> utility and posts a random quote.</p>
|
||||
</details>
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user