From 88587e4adda2ae0c8a90c4ae5ab0849fee329937 Mon Sep 17 00:00:00 2001 From: Ruben Barkow Date: Sat, 24 Aug 2019 13:50:33 +0200 Subject: [PATCH] clarify help message --- translate/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translate/bot.py b/translate/bot.py index 5c8ceee..ba4bc85 100644 --- a/translate/bot.py +++ b/translate/bot.py @@ -84,7 +84,7 @@ def is_acceptable(lang: str) -> bool: async def command_handler(self, evt: MessageEvent, language: Optional[Tuple[str, str]], text: str) -> None: if not language: - await evt.reply("Usage: !translate [from] [text or reply to message]") + await evt.reply("Missing two-letter language code; Usage: !translate [language code from] [language code to] [text or reply to message]") return if not self.config["response_reply"]: evt.disable_reply = True @@ -95,7 +95,7 @@ async def command_handler(self, evt: MessageEvent, language: Optional[Tuple[str, reply_evt = await self.client.get_event(evt.room_id, evt.content.get_reply_to()) text = reply_evt.content.body if not text: - await evt.reply("Usage: !translate [from] [text or reply to message]") + await evt.reply("Missing text; Usage: !translate [language code from] [language code to] [text or reply to message]") return result = await self.translator.translate(text, to_lang=language[1], from_lang=language[0]) await evt.reply(result.text)