omnicolor / commlink

Commlink RPG manager
MIT License
2 stars 0 forks source link

Refactor SlackController roll handling #1543

Open omnicolor opened 3 months ago

omnicolor commented 3 months ago

Instead of constructing the class name and then trying to instantiate it, use class_exist to see if it exists. This should also simplify debugging when writing new rolls to keep from having to add logging in the catch blocks.

https://github.com/omnicolor/commlink/blob/89034e2c47b34ab0d3c8c143319339efdc5073b4/app/Http/Controllers/SlackController.php#L84