3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Discord.pyのアップデート

Last updated at Posted at 2020-07-23

はじめに

つい最近Discord.pyのアップデートが来たので、「久々にBot起動してみたらイミフなエラーはいてて起動できない!!」みたいな人がいるのではないでしょうか?
そんな人のために、今回はDiscord.pyのアップデート方法を書きました。

エラー

Traceback (most recent call last):
  File "main.py", line 219, in <module>
    bot.run("")
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 640, in run
    return future.result()
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 621, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 585, in start
    await self.connect(reconnect=reconnect)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 499, in connect
    await self._connect()
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 463, in _connect
    await self.ws.poll_event()
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 471, in poll_event
    await self.received_message(msg)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\gateway.py", line 425, in received_message
    func(data)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 750, in parse_guild_create
    guild = self._get_create_guild(data)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\state.py", line 725, in _get_create_guild
    guild._from_data(data)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 297, in _from_data
    self._sync(guild)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\guild.py", line 324, in _sync
    self._add_channel(TextChannel(guild=self, data=c, state=self._state))
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\channel.py", line 107, in __init__
    self._update(guild, data)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\channel.py", line 131, in _update
    self._fill_overwrites(data)
  File "C:\Users\\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\abc.py", line 294, in _fill_overwrites
    self._overwrites.append(_Overwrites(id=overridden_id, **overridden))
TypeError: __new__() got an unexpected keyword argument 'deny_new'

久々にBot起動してみたらこんなエラーが出てた!!って人はDiscord.pyのアップデートをしてみてください。

アップデート方法

pip install -U discord.py
または
pip install --upgrade discord.py

これでアップデート完了です!起動してみてください。

最後に

新しいBotを作りました!
広告を簡単に追加したり表示したりできるBotです。
ぜひ導入してみてください!

[公式サポートサーバー]
https://discord.gg/SjKNtr6

[招待URL]
https://discord.com/api/oauth2/authorize?client_id=729317389803716658&permissions=523328&scope=bot

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?