【问题标题】:Discord Bot isn't ActivatingDiscord Bot 未激活
【发布时间】:2021-03-27 17:26:58
【问题描述】:

我正在尝试运行我的 discord 机器人,但后来我继续得到:

raise ClientConnectorCertificateError(aiohttp.client_exceptions.ClientConnectorCertificateError: 
Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] 
certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')]

我的代码是

import discord
from discord.ext import commands

client = commands.Bot(command_prefix="$")

@client.event
async def on_ready():
    print("Bot is ready")

@client.command()
async def hello(ctx):
    await ctx.send("hey")

client.run("-------------------------------------")

【问题讨论】:

  • 这是 SSL 的问题 - 也许你必须安装更新的 OpenSSL。它不是 Python 模块,而是许多程序使用 SSL 连接互联网的 C/C++ 库 - Python 也使用它。

标签: python ssl discord bots


【解决方案1】:

开始,输入 Internet Explorer。以管理员身份运行。

https://discord.com点击挂锁图标。

点击查看证书

点击安装证书,选择用户或本地机器。

单击将所有证书放入以下存储中

选择受信任的根证书颁发机构

享受吧。

【讨论】:

    猜你喜欢
    • 2019-04-17
    • 2020-10-18
    • 2021-04-16
    • 1970-01-01
    • 2021-06-15
    • 2021-01-21
    • 2021-10-16
    • 2021-11-04
    • 2020-07-17
    相关资源
    最近更新 更多