我正在尝试对我的bot进行身份验证,并将有关bot的信息发布到列出它们的服务器上。api声明,我必须首先通过发送bot的身份验证令牌来向他们的服务器进行身份验证。我总算搞定了。但是,当我试图将信息发布到指定的URL时,我甚至没有收到响应代码。在
async def apiPost():
servers = list(client.servers)
numServers = len(client.servers)
URL = "https://www.discordbotlist.com"
URL2 = "https://www.discordbotlist.com/api/bots/:botIDOmitted/stats"
servdata = {'guilds':int(numServers)}
authorization = {'Authorization':'Bot realTokenOmitted'}
r=requests.get(URL,headers=authorization)
print(r)
r=requests.post(URL2, data=servdata)
print(r)
我不太清楚我在这一点上做错了什么。在
目前没有回答
相关问题 更多 >
编程相关推荐