This repository was archived by the owner on Dec 1, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 31
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
Crash on message send #41
Copy link
Copy link
Open
Labels
Description
aegis.cpp/include/aegis/gateway/objects/impl/message.cpp
Lines 138 to 147 in d77feda
| if ((_guild == nullptr) && (_guild_id > 0)) | |
| _guild = _core->find_guild(_guild_id); | |
| if ((_channel == nullptr) && (_channel_id > 0)) | |
| _channel = _core->find_channel(_channel_id); | |
| if (!_channel) | |
| //throw because channel should always exist or else we have no understanding of the channel | |
| //TODO: create a dummy channel in this instance then request full info after? | |
| //bot would have already performed action on it by then. perhaps timed block here until channel info | |
| //is requested and populated and throw if it can't be requested? | |
| throw aegis::exception(error::channel_not_found); |
crash when sending a message too early. throw performed due to missing guild/channel cache is not possible to be caught due to futures