Enhance magic8 command response formatting

Format the magic8 command response based on message type.
This commit is contained in:
Adam Gessaman
2025-12-29 16:01:11 -08:00
committed by GitHub
parent e62765baf0
commit a7b14df9ef
@@ -36,4 +36,13 @@ class Magic8Command(BaseCommand):
async def execute(self, message: MeshMessage) -> bool:
"""Execute the magic8 command"""
answer = magic8()
return await self.send_response(message, answer)
# Format response with sender mention for channel messages, without for DMs
if message.is_dm:
response = f"🎱 {answer}"
else:
sender = message.sender_id or "Unknown"
response = f"🎱 @[{sender}] {answer}"
return await self.send_response(message, response)