<s>[INST] My Discord bot, written in Python, does not listen to events that occur in a certain guild, but others are detected.

I invoke events through an `on_ready()` method and assign them to a certain class inside the `on_guild_join()`. So here is the `on_ready()`:

```
async def on_ready(self):
    self.guilds_handler = GRID(self.client.loop)
    self.guilds_handler.source-loop)
    await self scrapyоз.get_cities()
    for guild in self.client.guilds:
        await self.guilds_handler.add_guild(guild)
```

Here is `on_guild_join()`:

```
async def on_guild_join(self, guild):
    await self.guilds_handler.add_guild(guild)
```

Here is the `add_guild()` method from the `GRID` class:

```
async def add_guild(self, guild: Guild):
    print("Adding guild: " + guild.name)
    channel = await self.get_default_channel(guild.id)
    self.guilds[guild.id] = Listener(self.loop, guild, channel)
    print("Listening on channel: " + channel.name)
    # await self.guilds[guild.id].start()
```

Here is `Listener` class:

```
    async def start(self):
        messages = utils.stream(self.client.get_channel(self.channel.id), limit=1000)
        await self.search_in_db_against(messages)

```

I would like to get assistance in figuring out why some guilds are not properly "listenable" or handled.

Let's assume this is my Logs from DEBUG:

```
[23:42:12] DEBUG    discord.gateway: Shard ID 0 has connected to Gateway (Version 9).
[23:42:12] DEBUG    discord.gateway: Shard ID 0 has preparedensibly (version: 9) and may start receiving events.
[23:42:13] DEBUG    discord.client: READY retrieved user payload.
[23:42:13] DEBUG    discord.client: Clientheartbeat started.
[23:42:13] DEBUG discord.gateway Ready event cleared: True.
[23:42:13] DEBUG    discord.client: Clientshall eventsHandler.
[23:42:17] DEBUG    meowhat nye.: Removing guild None from cache via update (kw)
[23:43:16] DEBUG    discord.gateway User update: 63138301102719480 (bot)
[23:44:36] DEBUG    dogINSE: Adding guild: Republican Mustang (02/313637)
[23:44:36] DEBUG    dogINSE: Listening on channel: #general
[23:45:10] DEBUG    om灬geo Institute: Adding guild: French Bulldog Huboc Com unity (73365765767)
[23:45:10] DEBUG    om灬geo Institute: Listening on channel: #ic-general
```

What is the problem with guilds that are not properly handled?[/INST]