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

Crash on message send #41

Open
zeroxs opened this issue Apr 21, 2020 · 0 comments
Open

Crash on message send #41

zeroxs opened this issue Apr 21, 2020 · 0 comments
Labels

Comments

@zeroxs
Copy link
Owner

zeroxs commented Apr 21, 2020

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

@zeroxs zeroxs added the bug label Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant