diff --git a/bot/commands/medications.py b/bot/commands/medications.py index a11ea0e..6daf392 100644 --- a/bot/commands/medications.py +++ b/bot/commands/medications.py @@ -142,7 +142,8 @@ async def handle_medication(message, session, parsed): await message.channel.send("**Today's Medications:**\n" + "\n".join(lines)) else: - await message.channel.send(f"Error: {resp.get('error', 'Failed to fetch today\'s schedule')}") + error_msg = "Failed to fetch today's schedule" + await message.channel.send(f"Error: {resp.get('error', error_msg)}") elif action == "refills": resp, status = api_request("get", "/api/medications/refills-due", token)