-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Censor middleware does not get run on messages that were sent in channels not of the type TextChannel (e.g. discord.threads.Thread or discord.channel.VoiceChannel). This is due to the following lines filtering out messages from ignored channel types:
Lines 48 to 54 in e2e768b
| # Type checking - Assume messages come from a text channel where the author | |
| # is a member of the server | |
| if not isinstance(message.channel, discord.TextChannel) or not isinstance( | |
| message.author, | |
| discord.Member, | |
| ): | |
| return |
We should change this to a list of channel types where censoring is not needed. If more types are ever added in future discord.py versions that conflict with the current typing/member interface (LSP starts spitting out type errors when accessing message.channel.*), then we can refactor to fix the type warnings.
Metadata
Metadata
Assignees
Labels
No labels