dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
684 stars 162 forks source link

[BUG] Can't start the script sometimes #55

Closed kouranio closed 3 years ago

kouranio commented 3 years ago

Summary

A simple summary of the bug.

when i launch the script it crashes sometimes

Reproduction Steps

How did you make it happen?
  1. start the script

Code

Relevant code that shows the bug.
future: <Task finished name='Task-8' coro=<ConnectionState._delay_ready() done, defined at /home/kouranio/.local/lib/python3.9/site-packages/discord/state.py:418> exception=IndexError('list index out of range')>
Traceback (most recent call last):
  File "/home/kouranio/.local/lib/python3.9/site-packages/discord/state.py", line 465, in _delay_ready
    self.call_handlers('ready')
  File "/home/kouranio/.local/lib/python3.9/site-packages/discord/state.py", line 234, in call_handlers
    func(*args, **kwargs)
  File "/home/kouranio/.local/lib/python3.9/site-packages/discord/client.py", line 284, in _handle_ready
    str(guild.channels[0].id): [
IndexError: list index out of range

Expected Results

What is supposed to happen?

the script starts normally

Actual Results

What is currently happening?

it crashes but when i start the script again and again it works sometimes

System Info

Run python -m discord --version and paste the information below.
- Python v3.9.5-final
- discord.py v1.8.1-final
- aiohttp v3.7.4.post0
- system info: Linux 5.12.12-arch1-1 #1 SMP PREEMPT Fri, 18 Jun 2021 21:59:22 +0000

Checklist

Let's make sure this issue is valid!

Additional Information

Put any extra context, weird configurations, or other important info here.
dolfies commented 3 years ago

Add this to the endless list of things fixed by the next update :P