J_C
J_C

Reputation: 347

discord.py bot crashes randomly

I'm using discord.py v0.16.12, and I occasionally get this traceback that crashes the bot. The token is present and valid even though the traceback leads you to believe otherwise.

Traceback (most recent call last):
  File "main.py", line 94, in <module>
    bot.run(auth.get('discord', 'TOKEN'))
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/client.py", line 519, in run
    self.loop.run_until_complete(self.start(*args, **kwargs))
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/client.py", line 491, in start
    yield from self.connect()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/client.py", line 448, in connect
    yield from self.ws.poll_event()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/gateway.py", line 431, in poll_event
    yield from self.received_message(msg)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/gateway.py", line 390, in received_message
    func(data)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/discord/state.py", line 256, in parse_message_update
    message.embeds = data['embeds']
KeyError: 'embeds'

Upvotes: 0

Views: 473

Answers (1)

Harmon758
Harmon758

Reputation: 5157

This was an issue that was fixed with v1.2.0 of discord.py.

v0.16.12 is an outdated version of discord.py that isn't supported anymore.
You should look into migrating to v1.

Upvotes: 2

Related Questions