-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Produce some useful error before exiting when a channel does not exist #697
Comments
Forgot to mention that this is not an issue locally but on docker/podman. |
Correction, during prod mode. |
This is intended, a design decision I made a while ago. Since Lion is run on a server of a static set of channels and only intended for the UCF CS server. The other alternative is to null check every time we need to look up a channel, which is unnecessary since each test server should be made off the template |
I only made this issue because for the other channels it does not seem to care and shoots only a warning log instead of straight up crashing without saying why. |
It's doing that because when you change to production mode, the bot try's to call GuildService.getChannel for the GitHub channel If you use any plugin/handler that requires this, the same will happen for any other channel I do agree there should be a warning, and an error thrown, but I do not want to have to null check. |
Maybe not a null check, but some sort of logging would suffice in case there is an accidental deletion of a channel. |
yeah it would be nice to say "expected channel to exist" or something? hopefully we catch a toplevel exception for it. someone else can tal though |
Would be some simple one liner here Currently the bot just asserts the type instead of null checking |
Need some sort of null check for the channel during bot init.
The text was updated successfully, but these errors were encountered: