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.87]) by gnuweeb.org (Postfix) with ESMTPSA id 120F88104C; Tue, 18 Oct 2022 08:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1666081054; bh=m6ErSehqpuDRVeji3lP3LDLHrbNiNgj0UNnHMV+Q3Us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U17LN1d6OhWTsblfrdHB3WqrC468R5a3/fA8oKnBBnhl8bqVYtp/1OMhHFFTOjRn+ vNc+CRn9O4ZLEczho7efimC4ELo1tSJ3G408GkSuqheyWLAufhsilcShf3Yhzz43LN hCSr34BVZ6pNAj8pN9XImmqpcs8fCTNijNfEbsXkP8UBvogW+lrJAMSv6ejCQ9Ac91 AwJi2FgTKrDTQFEd/LnzBEkqI3UFQSkdctkwelBCxF5eW9McBJYYCeU+t/bgkbce3Y WFsk7AlBxWlPUAIvV/nzuE6A2ak2ew0hmQimSLEx5wSyUVXJR5Hf/sAH6hIzuRCcox VULeufLJWGy6Q== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH v1 1/7] discord: Add send_text_mail_interaction() Date: Tue, 18 Oct 2022 15:16:29 +0700 Message-Id: <20221018081635.1617-2-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20221018081635.1617-1-kiizuha@gnuweeb.org> References: <20221018081635.1617-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Add send_text_mail_interaction() for the `/atom get {url}` to get the specific lore email message from an URL in future use. Signed-off-by: Muhammad Rizki --- daemon/dscord/gnuweeb/client.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/daemon/dscord/gnuweeb/client.py b/daemon/dscord/gnuweeb/client.py index 03a1b8c..15a6eee 100644 --- a/daemon/dscord/gnuweeb/client.py +++ b/daemon/dscord/gnuweeb/client.py @@ -4,6 +4,7 @@ # import discord +from discord import Interaction from discord.ext import commands from discord import Intents from dscord.config import ACTIVITY_NAME @@ -76,3 +77,11 @@ class GWClient(commands.Bot): utils.remove_patch(tmp) return m + + + async def send_text_mail_interaction(self, i: "Interaction", + text: str, url: str = None): + return await i.response.send_message( + content=text, + view=models.FullMessageBtn(url) + ) -- Muhammad Rizki