Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Commit 669cddf

Browse files
committed
feat: reply method
1 parent 1605706 commit 669cddf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

discord_components/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ async def send_component_msg_prop(ctxorchannel, *args, **kwargs) -> Message:
6969
async def edit_component_msg_prop(*args, **kwargs):
7070
return await self.edit_component_msg(*args, **kwargs)
7171

72+
async def reply_component_msg_prop(msg, *args, **kwargs):
73+
return await self.send_component_msg(msg.channel, *args, **kwargs, reference=msg)
74+
7275
async def wait_for_interact_ctx(ctx, *args, **kwargs):
7376
return await self.wait_for_interact(*args, **kwargs)
7477

@@ -85,6 +88,7 @@ async def on_socket_response(res):
8588
self.bot.on_socket_response = on_socket_response
8689
Messageable.send = send_component_msg_prop
8790
Message.edit = edit_component_msg_prop
91+
Message.reply = reply_component_msg_prop
8892
DContext.wait_for_interact = wait_for_interact_ctx
8993

9094
async def send_component_msg(

0 commit comments

Comments
 (0)