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.94]) by gnuweeb.org (Postfix) with ESMTPSA id 9EF11806D7; Fri, 29 Jul 2022 01:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1659058904; bh=aW1OzyBWgrINn2LGPlQnhP0+q2A0j1kbjE8Xwf8/tNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bivl2h27aDwcEsPKT2QNakUDFcrOz6U45s6fz5q8KgoumSpSYc6ZRtP5t7M/eMSHy gYqCMRJzr6NIxKa7ocg7gQcjXeJ15AtyqA7TymYAR0jf3uRvTmZJSV2TZNbbyM11Ev V2RVJRnnCFfGe7IBm95Ehu2B2OnKRr5TaOQAXR47+AftVOBMKTLp2kMBhR40QaU761 5a1H193gEd1GzhD6YuM9DPAIhiMhuZp4VSSC0N75tRGizRbPKV2A5sW3bMBsdXt/si 426bCtaUQSIAWl0s7Bh80h+OoXURKtOB6mxxUoIMaKtxkRD2rEJvD5a85ymq3yBHK6 JpmYSiWA2yyuQ== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , GNU/Weeb Mailing List , Alviro Iskandar Setiawan Subject: [PATCH v3 04/18] Create /add_atom command Date: Fri, 29 Jul 2022 08:40:38 +0700 Message-Id: <20220729014052.1547-5-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220729014052.1547-1-kiizuha@gnuweeb.org> References: <20220729014052.1547-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Create /add_atom command for adding the atom url to the database Signed-off-by: Muhammad Rizki --- daemon/packages/plugins/manage_atom.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 daemon/packages/plugins/manage_atom.py diff --git a/daemon/packages/plugins/manage_atom.py b/daemon/packages/plugins/manage_atom.py new file mode 100644 index 0000000..eca3a60 --- /dev/null +++ b/daemon/packages/plugins/manage_atom.py @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2022 Muhammad Rizki +# + +from pyrogram.types import Message +from pyrogram import filters +from packages import DaemonClient + +@DaemonClient.on_message( + filters.command("add_atom") & + filters.chat(["kiizuah", "nekoha", -1001673279485]) +) +async def add_atom_url(c: DaemonClient, m: Message): + pass + # text = utils.remove_command(m.text) + # if not utils.is_atom_url(text): + # return + + # ### + # ### TODO: Muhammad Rizki: Add atom url into the database + # ### -- Muhammad Rizki