@@ -78,14 +78,12 @@ def command_request(self, method, guild_id, url_ending="", **kwargs):
7878 route = CustomRoute (method , url )
7979 return self ._discord .http .request (route , ** kwargs )
8080
81- def post (self , _resp , wait : bool , interaction_id , token , initial = False , files : typing .List [discord .File ] = None ):
81+ def post (self , _resp , interaction_id , token , initial = False , files : typing .List [discord .File ] = None ):
8282 """
8383 Sends command response POST request to Discord API.
8484
8585 :param _resp: Command response.
8686 :type _resp: dict
87- :param wait: Whether the server should wait before sending a response.
88- :type wait: bool
8987 :param interaction_id: Interaction ID.
9088 :param token: Command message token.
9189 :param initial: Whether this request is initial. Default ``False``
@@ -94,13 +92,13 @@ def post(self, _resp, wait: bool, interaction_id, token, initial=False, files: t
9492 :return: Coroutine
9593 """
9694 if files :
97- return self .post_with_files (_resp , wait , files , token )
98- req_url = f"/interactions/{ interaction_id } /{ token } /callback" if initial else f"/webhooks/{ self ._discord .user .id } /{ token } ?wait= { 'true' if wait else 'false' } "
95+ return self .post_with_files (_resp , files , token )
96+ req_url = f"/interactions/{ interaction_id } /{ token } /callback" if initial else f"/webhooks/{ self ._discord .user .id } /{ token } "
9997 route = CustomRoute ("POST" , req_url )
10098 return self ._discord .http .request (route , json = _resp )
10199
102- def post_with_files (self , _resp , wait : bool , files : typing .List [discord .File ], token ):
103- req_url = f"/webhooks/{ self ._discord .user .id } /{ token } ?wait= { 'true' if wait else 'false' } "
100+ def post_with_files (self , _resp , files : typing .List [discord .File ], token ):
101+ req_url = f"/webhooks/{ self ._discord .user .id } /{ token } "
104102 route = CustomRoute ("POST" , req_url )
105103 form = aiohttp .FormData ()
106104 form .add_field ("payload_json" , json .dumps (_resp ))
0 commit comments