如何通过它的 api 在不和谐频道中发送消息



我正试图在我的频道中发送消息。正如我所读到的,我需要将消息作为post请求中的内容参数进行传递。这是的短python代码

import requests
URL = "https://discordapp.com/api/webhooks/super/secret
r = requests.get(URL,data={"content":"123"},headers={"Content-Type":"application/json"})
print(r.text)

但它给了我一个回应:

<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>400.</b> <ins>That’s an error.</ins>
<p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>

他们的文档中的Discord HERE说:

一些API和网关版本现在无法运行,并被标记为下表中已停止,以供后人使用。尝试使用这些版本将失败并返回400错误请求。

最新更新