-
Notifications
You must be signed in to change notification settings - Fork 817
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
Discord fix when a channel is not found. #1480
Conversation
if channel is None: | ||
raise FileNotFoundError("Channel not found.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know for a fact if this is None it's because the channel wasn't found versus a connectivity issue? asking because we hit the error earlier and it seemed to be an ephemeral issue, which would suggest the latter, right? I want to make sure we don't mislead the caller here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on a comment on the discord client we're using:
The returned channel or ``None`` if not found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, but then why were we seeing that in CI intermittently? ...because obviously that channel didn't disappear/reappear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also probably good to drop a line to that documentation as comment in the code here, but probably helpful for us to understand why this is the case intermittently in CI. seems like some other case is also resulting in this being None (if None is what triggered the original error we were seeing)
looks like we have no actual changes at this point? I know this is still draft, assuming something is in progress? |
jump_url
get_channel
function from the discord client returns None when the given channel couldn't be fetched or it doesn't exists.bot.get_channel
only once within the callback function used by the discord bot. If the fetching of the channel fails, we note it earlier.