mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-28 05:14:12 +00:00
Enhance magic8 command response formatting
Format the magic8 command response based on message type.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user