Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

channel == nullptr #25

@zeroxs

Description

@zeroxs

Due to the async design, a MESSAGE_CREATE can be processed prior to a GUILD_CREATE creating the scenario of a message being handled that has no channel in the cache which leads to the message being rejected.

log->warn("Shard#{} - channel == nullptr - {} {} {}", _shard->get_id(), c_id, result["d"]["author"]["id"].get<std::string>(), result["d"]["content"].get<std::string>());

Solution is to perform a create_channel() to create a semi-empty channel so the message can still be handled. This would be best accomplished with some sort of flag in the channel object itself to identify whether or not the channel is in this empty state or has been populated by a GUILD_CREATE or CHANNEL_CREATE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions