discord.py 如何设置代理?有没有简单的方法让机器人通过代理运行?

7 Replies, 1538 Views

兄弟,我之前也卡在这,后来发现直接用 `requests` 的代理设置也能搞定。
discord.py 如何设置代理 的话,可以这样:
```python
import discord
import requests

proxies = {"http": "http://你的代理地址", "https": "http://你的代理地址"}
client = discord.Client(http_session=requests.Session(proxies=proxies))
```
虽然有点绕,但效果还不错,你可以试试!

Messages In This Thread



Users browsing this thread: 1 Guest(s)