From 23fd5e78fd55a62eec965eb3946520a61370683b Mon Sep 17 00:00:00 2001 From: A lucky guy <79245287+tom-snow@users.noreply.github.com> Date: Mon, 21 Nov 2022 09:45:22 +0800 Subject: [PATCH] =?UTF-8?q?google=20=E6=94=AF=E6=8C=81=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=20(#99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: omg-xtao <100690902+omg-xtao@users.noreply.github.com> --- google/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google/main.py b/google/main.py index 9ae4d26..3e61e76 100644 --- a/google/main.py +++ b/google/main.py @@ -15,7 +15,9 @@ async def google(message: Message): """ Searches Google for a string. """ query = message.arguments if not query: - return await message.edit(lang('arg_error')) + if not message.reply_to_message: + return await message.edit(lang('arg_error')) + query = message.reply_to_message.text mg = MagicGoogle() query = query.replace(' ', '+') if not Config.SILENT: