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=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.88.254] (unknown [125.160.110.145]) by gnuweeb.org (Postfix) with ESMTPSA id 0843E7E257; Mon, 18 Jul 2022 12:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1658148554; bh=fk28iVklLgIFsb28vzHQhND5rkfGq1a+64TD5I9mcmc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Sc2x523eOpaKNv8dfzB+X5Vigryi77GKTvE5aF8xu8YUDmN4eeozUBPH+ecaKUbtn 5aqFrkcvnvT9FJiUZrG2HYFDNNfOMWTMxQCO+enzu0UQGAYSUlKEeLnmCoJL3bV+kl g058EnZA+KTXK1tEI41hSpj9YMxA4zLSXwQPtSQW8HoPHBE/B3IhYujzzmMjgMFGia 4wdKb92k3FeZJEusUH0dyLxtUMHmvk7rXh50IRZ/Vkn0/heLflUSG8f99z/RGgfETi McfgCV1ZRChXP5T4p7jEargOgd6ha9gsfy14EW42IhwBmBW7yvi45en1x25AcxZiRz AtiVliCIEfO+Q== Message-ID: Date: Mon, 18 Jul 2022 19:49:11 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 07/11] Re-design send email message to Telegram Content-Language: en-US To: Muhammad Rizki Cc: GNU/Weeb Mailing List References: <20220718112007.792-1-riskimuhammmad1@gmail.com> <20220718112007.792-8-riskimuhammmad1@gmail.com> From: Ammar Faizi In-Reply-To: <20220718112007.792-8-riskimuhammmad1@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 7/18/22 6:20 PM, Muhammad Rizki wrote: > +class DaemonClient(Client): > + def __init__(self, name: str, api_id: int, > + api_hash: str, **kwargs): > + super().__init__(name, api_id, > + api_hash, **kwargs) > + > + > + async def send_text_email( > + self, > + chat_id: Union[int, str], > + text: str, > + reply_to: int, > + url: str = None, > + parse_mode: ParseMode = ParseMode.HTML > + ) -> Message: > + print("[send_text_email]") > + return await self.send_message( > + chat_id=chat_id, > + text=text, > + reply_to_message_id=reply_to, > + parse_mode=parse_mode, > + reply_markup=InlineKeyboardMarkup([ > + [InlineKeyboardButton( > + "See the full message", > + url=url > + )] > + ]) > + ) [...] > + print("[send_patch_email]") > + return await self.send_document( > + chat_id=chat_id, > + document=doc, > + caption=caption, > + reply_to_message_id=reply_to, > + parse_mode=parse_mode, > + reply_markup=InlineKeyboardMarkup([ Please always use tabs to start the indentation. -- Ammar Faizi