This repository was archived by the owner on Aug 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 3535from .member import Member
3636from .message import Message , Attachment
3737from .object import Object
38- from .webhook .async_ import async_context
38+ from .webhook .async_ import async_context , Webhook
3939
4040__all__ = (
4141 'Interaction' ,
@@ -100,6 +100,7 @@ class Interaction:
100100 '_state' ,
101101 '_session' ,
102102 '_cs_response' ,
103+ '_cs_followup' ,
103104 )
104105
105106 def __init__ (self , * , data : InteractionPayload , state : ConnectionState ):
@@ -158,6 +159,16 @@ def response(self) -> InteractionResponse:
158159 """:class:`InteractionResponse`: Returns an object responsible for handling responding to the interaction."""
159160 return InteractionResponse (self )
160161
162+ @utils .cached_slot_property ('_cs_followup' )
163+ def followup (self ) -> Webhook :
164+ """:class:`Webhook`: Returns the follow up webhook for follow up interactions."""
165+ payload = {
166+ 'id' : self .application_id ,
167+ 'type' : 3 ,
168+ 'token' : self .token ,
169+ }
170+ return Webhook .from_state (data = payload , state = self ._state )
171+
161172
162173class InteractionResponse :
163174 """Represents a Discord interaction response.
You can’t perform that action at this time.
0 commit comments