Kord-Extensions / kord-extensions

Kord extensions framework, providing commands and distinct units of functionality
https://kordex.dev
European Union Public License 1.2
112 stars 27 forks source link

Update phishing and pluralkit extension to use nullable functions and… #204

Closed NoComment1105 closed 1 year ago

NoComment1105 commented 1 year ago

… catch some more exceptions.

Previously, the phishing extension would relentlessly send exceptions for being unable to read URLs for various reasons, this is extremely frustrating since it's out of the users control. I've switch this to catch all exceptions, and log them at warn level instead, so they're still visible.

The PluralKit extension attempts to get channels using asChannelOf currently, resulting in class cast exceptions and null pointer exceptions. I have moves over to using asChannelOfOrNull to avoid the NPEs and surrounded initial attempts at using this function with a try/catch for ClassCastExceptions

gdude2002 commented 1 year ago

This is more or less good - thanks for the contribution!