MahdeenSky / BDPlugins

BetterDiscord Plugins
MIT License
1 stars 1 forks source link

Text Replacer can send invalid messages. #8

Closed SnowboundCabin closed 7 months ago

SnowboundCabin commented 8 months ago

If Text Replacer replaces the entire message with something like a single space, the message still gets sent, rather than blocked client-side as the manual equivalent would. This results in an error along the lines of "you may not share a server with the recipient, or they may have blocked you." (Yes, this happens in all channels, not just DMs.)

MahdeenSky commented 7 months ago

With the way the plugin is coded, I'm not quite sure how to prevent Discord from sending the message, so I resolved it by sending a zero-width space instead (still looks empty) but hey atleast discord doesn't block the message if it's empty after getting replaced.

Fixed with 53e8b60b1c229f80d2b8d1ca2619a1bc10a5e0b6