-
-
Notifications
You must be signed in to change notification settings - Fork 675
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
Do not account for jump urls for voice channels #2556
Do not account for jump urls for voice channels #2556
Conversation
bot/utils/channel.py
Outdated
channel: discord.TextChannel | discord.DMChannel | discord.Thread | discord.StageChannel | ||
) -> bool: | ||
"""Return True if `channel` is a voice one.""" | ||
return channel.type in [discord.ChannelType.voice, discord.ChannelType.stage_voice] |
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.
We might want to account for null channels that we ignore here.
In that case, I'm not sure what value to return 🤔
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.
I guess we can just let it throw, and handle those case by case if they will ever occur instead of possibly inferring the wrong type.
10cde5d
to
c0773f2
Compare
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.
Untested
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.
Looks good
Closes #2555
on_voice_state_update
events do not havemessage
attributes in their context.Which is why we'll ignore setting the
jump_url
for infractions triggered by these events.