Skip to content

Refactor SlackController roll handling #1543

@omnicolor

Description

@omnicolor

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.

$roll = new $class($this->text, $channel->username, $channel);

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency filephpPull requests that update PHP code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions