From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.125.57]) by gnuweeb.org (Postfix) with ESMTPSA id 288AC7E317; Tue, 19 Jul 2022 00:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1658189898; bh=3pUbeeuYd9pic/qqSnpJiTTjt7DS7QTgMAWO1J/Xd18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wn2ZnvATwBjsbefJoYDtV+PQlwSkYArpuJ9/LwvOx4m4bedA6KTQa7H6pgNQzqnXj l4uMLqyaMUkD1WsJwVrw1h1nixmRzPzW5G0sVnLzbMBbUfxj2zQLATPUNmf27SW3Vp H2LITri10fYpNkeF/WI85gR7j6i6akS19I6Ib0+eoUQypSj9BijEHQynzK6fLsQIRE nVXp0KvaY5lGhmTwSA82lxD+fou5CcfGZOKIN/Ah9KPUg63W6jEBpBlDQO5Zp+Sdbg 4fKVLNpxkv56Vpq/e5wObtq9PovJJoNRzsP0ExJbT1U5qjJlHNrXQv/XglxQsUgoCc 94y4ltvaLeuFw== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , GNU/Weeb Mailing List Subject: [PATCH v2 08/18] Move ____send_patch_msg Date: Tue, 19 Jul 2022 07:17:34 +0700 Message-Id: <20220719001744.1950-9-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220719001744.1950-1-kiizuha@gnuweeb.org> References: <20220719001744.1950-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Muhammad Rizki I want to move the ____send_patch_msg into the DaemonClient, so it much cleaner if we separate the send email message into the DaemonClient. Signed-off-by: Muhammad Rizki --- daemon/scraper/bot.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/daemon/scraper/bot.py b/daemon/scraper/bot.py index 93e633a..4903fef 100644 --- a/daemon/scraper/bot.py +++ b/daemon/scraper/bot.py @@ -233,20 +233,3 @@ class Bot(): n = int(x.group(1)) print(f"[____handle_telegram_floodwait]: Sleeping for {n} seconds due to Telegram limit") await asyncio.sleep(n) - - - async def ____send_patch_msg(self, tg_chat_id, reply_to, fnm, caption, - url): - return await self.client.send_document( - tg_chat_id, - fnm, - caption=caption, - reply_to_message_id=reply_to, - parse_mode=enums.ParseMode.HTML, - reply_markup=InlineKeyboardMarkup([ - [InlineKeyboardButton( - "See the full message", - url=url - )] - ]) - ) -- Muhammad Rizki