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.15]) by gnuweeb.org (Postfix) with ESMTPSA id D876F8079D; Tue, 2 Aug 2022 21:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1659476827; bh=TOlccu2yuvdU7JDfTyfYEx2Z8uSNhZaOQEkSZAyRaZ0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KZmVxgjFqokv8tUYvlu/6YNuYTWZoV+mQ/uPF3tp/funOsaCMKoSf+V0zzRd19yS5 2TA6lxeY8HwXO6z3vSdDcYa7GcWwVId3vH6ghoBTEXMS3d9a36mNMQ/muaeAgDsoxk SpsDNXwvTzzxliLweYii1KeaZ8Ew0idgtcpQsINv61O2Kstl6cxcMKnCxHMX1rIwzL KZKLLgzg9tHyCfwxNgmzn1F0kDHJ4ginyQumevSxkBNMHEKzjMaIMIZk46S5Q3kuUO A2NowgrKpMa8kTZFGHC1VgbIiLcH9c/jCCkjdafK8Mokw0VKSNWtdFWfaik5sx1lmp FKEEkmADIMcag== Message-ID: <28610a2a-cc20-84f2-1173-a0b5c3589fa6@gnuweeb.org> Date: Wed, 3 Aug 2022 04:47:03 +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 v5 18/19] Add /del_bc bot command Content-Language: en-US To: Muhammad Rizki Cc: GNU/Weeb Mailing List , Alviro Iskandar Setiawan References: <20220801001917.992-1-kiizuha@gnuweeb.org> <20220801001917.992-19-kiizuha@gnuweeb.org> From: Ammar Faizi In-Reply-To: <20220801001917.992-19-kiizuha@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 8/1/22 7:19 AM, Muhammad Rizki wrote: > + if len(chats) == 0: > + return await m.reply("Currently empty.") > + > + text = "List of chats that will receive email message:\n" > + for u,i in zip(chats, range(1, len(chats)+1)): > + text += f"{i}. **[{u[3]}]({u[5]})**\n" > + A trailing whitespace here. > + text += "\nChoose one of the chat above to delete by index below." > + return await m.reply( > + text=text, > + disable_web_page_preview=True, > + reply_markup=utils.button_numbers( > + data=chats, > + callback_prefix="del_chat" > + ) > + ) > + A trailing whitespace here. > + success = c.db.delete_broadcast(m.chat.id) > + if not success: -- Ammar Faizi