public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 01/28] discord: Add send_text_mail_interaction()
@ 2022-12-19 23:51 Muhammad Rizki
  2022-12-19 23:52 ` [PATCH 02/28] discord: Add send_patch_mail_interaction() Muhammad Rizki
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Muhammad Rizki @ 2022-12-19 23:51 UTC (permalink / raw)
  Cc: Muhammad Rizki, Alviro Iskandar Setiawan, Ammar Faizi,
	GNU/Weeb Mailing List

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 <[email protected]>
Link: https://lore.gnuweeb.org/gwml/[email protected]
Cc: Alviro Iskandar Setiawan <[email protected]>
Cc: Ammar Faizi <[email protected]>
Cc: GNU/Weeb Mailing List <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
 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)
+		)
-- 
2.34.1.windows.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-19 23:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 23:51 [PATCH 01/28] discord: Add send_text_mail_interaction() Muhammad Rizki
2022-12-19 23:52 ` [PATCH 02/28] discord: Add send_patch_mail_interaction() Muhammad Rizki
2022-12-19 23:52 ` [PATCH 03/28] discord: Add get lore mail slash command Muhammad Rizki
2022-12-19 23:52 ` [PATCH 04/28] atom: Improve remove_patch() Muhammad Rizki
2022-12-19 23:52 ` [PATCH 05/28] atom: add get_decoded_payload() Muhammad Rizki
2022-12-19 23:52 ` [PATCH 06/28] telegram: Fix get lore command Muhammad Rizki
2022-12-19 23:52 ` [PATCH 07/28] atom: Improve extract_body() Muhammad Rizki
2022-12-19 23:52 ` [PATCH 08/28] enum: Add Platform enumeration Muhammad Rizki
2022-12-19 23:52 ` [PATCH 09/28] enum: Use the created Platform class enumeration Muhammad Rizki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox