diff options
author | 2025-07-18 17:38:57 +0200 | |
---|---|---|
committer | 2025-07-18 18:08:47 +0200 | |
commit | 8b3b7e5d5a94e90a251010a20502cc559d530344 (patch) | |
tree | aab88c9b7aadd61fe15ae460e0eb97fda7832970 /arthur/exts/systems/system_information.py | |
parent | Remove org member does not return content (diff) |
fix(deps): update dependency humanize to v4.12.2
Diffstat (limited to 'arthur/exts/systems/system_information.py')
-rw-r--r-- | arthur/exts/systems/system_information.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arthur/exts/systems/system_information.py b/arthur/exts/systems/system_information.py index 12afc0b..51b0ed2 100644 --- a/arthur/exts/systems/system_information.py +++ b/arthur/exts/systems/system_information.py @@ -1,6 +1,7 @@ """Return system information on our production 9front infrastructure.""" import asyncio +import base64 import io import random from datetime import UTC, datetime @@ -16,6 +17,7 @@ from wand.image import Image from arthur.apis.systems import lib9front from arthur.bot import KingArthur from arthur.config import CONFIG +from arthur.exts.systems.motd import MOTD BASE_RESOURCE = "https://git.9front.org/plan9front/plan9front/HEAD/{}/raw" THRESHOLD = 0.01 @@ -195,6 +197,13 @@ I enjoy talking to you. Your mind appeals to me. It resembles my own mind except result = random.choice(contents.splitlines()) await ctx.reply(result) + @command(name="motd") + async def motd(self, ctx: Context) -> None: + """Generate an image representing the message of the day.""" + payload = MOTD.replace(b"\n", b"") + file = File(io.BytesIO(base64.b64decode(payload)), filename="motd.png") + await ctx.send(file=file) + async def setup(bot: KingArthur) -> None: """Add cog to bot.""" |