Skip to content

Commit

Permalink
Update discordSDK.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Jan 2, 2024
1 parent b98e205 commit 245116a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions OlivOS/adapter/discord/discordSDK.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,20 @@ def do_api(self, req_type='POST', proxy=None):

msg_res = None
if req_type == 'POST':
msg_res = req.request("POST", send_url, headers=headers, data=payload,
proxies=OlivOS.webTool.get_system_proxy())
msg_res = req.request(
"POST",
send_url,
headers=headers,
data=payload,
proxies=OlivOS.webTool.get_system_proxy()
)
elif req_type == 'GET':
msg_res = req.request("GET", send_url, headers=headers, proxies=OlivOS.webTool.get_system_proxy())

if self.bot_info.debug_mode:
if self.bot_info.debug_logger is not None:
self.bot_info.debug_logger.log(0, self.node_ext + ' - sendding succeed: ' + msg_res.text)
msg_res = req.request(
"GET",
send_url,
headers=headers,
proxies=OlivOS.webTool.get_system_proxy()
)

self.res = msg_res.text
return msg_res.text
Expand Down

0 comments on commit 245116a

Please sign in to comment.