使自机器人加入discord邀请链接discord.py

时间:2019-07-28 13:16:56

标签: python-3.x discord.py

我正在为不和谐做一个自我机器人,我希望它通过服务器的邀请链接加入不和谐服务器。

Bot(command_prefix = "ChaosBot")

这就是我想要做的:

    @cbot.event
    async def on_ready():
       print("Connected!")
       await cbot.accept_invite("https://discord.gg/******")

但是我得到这个错误:

Connected!
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\discord\client.py", line 242, in _run_event
    await coro(*args, **kwargs)
  File "spambot.py", line 36, in on_ready
    await cbot.accept_invite("https://discord.gg/uwdFUh")
AttributeError: 'Bot' object has no attribute 'accept_invite'

0 个答案:

没有答案