本日(2020/07/22)突然今まで動いていたPythonで作成したDiscord Botがエラーを吐いて停止しました。
エラー内容
Traceback (most recent call last): File "discord_bot.py", line 246, in client.run(DISCORD_TOKEN) File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 640, in run return future.result() File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 621, in runner await self.start(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 585, in start await self.connect(reconnect=reconnect) File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 499, in connect await self._connect() File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 463, in _connect await self.ws.poll_event() File "/usr/local/lib/python3.7/site-packages/discord/gateway.py", line 471, in poll_event await self.received_message(msg) File "/usr/local/lib/python3.7/site-packages/discord/gateway.py", line 425, in received_message func(data) File "/usr/local/lib/python3.7/site-packages/discord/state.py", line 750, in parse_guild_create guild = self._get_create_guild(data) File "/usr/local/lib/python3.7/site-packages/discord/state.py", line 725, in _get_create_guild guild._from_data(data) File "/usr/local/lib/python3.7/site-packages/discord/guild.py", line 296, in _from_data self._sync(guild) File "/usr/local/lib/python3.7/site-packages/discord/guild.py", line 323, in _sync self._add_channel(TextChannel(guild=self, data=c, state=self._state)) File "/usr/local/lib/python3.7/site-packages/discord/channel.py", line 107, in __init__ self._update(guild, data) File "/usr/local/lib/python3.7/site-packages/discord/channel.py", line 131, in _update self._fill_overwrites(data) File "/usr/local/lib/python3.7/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'
Discord側に変更があったみたい?
Attention Required! | Cloudflare
これによると以下でdiscord.pyを更新してあげれば良いみたいです。
私のBotもこれで動くようになりました。
python3 -m pip install -U discord.py
javascriptのBotとかは平気なんでしょうか?そのうちPythonと同じ運命になるんでしょうか。
もしなった場合はSDK更新してみましょう。
コメント