diff options
-rw-r--r-- | lib/Bot/Games/Trait/Attribute/Formatted.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Bot/Games/Trait/Attribute/Formatted.pm b/lib/Bot/Games/Trait/Attribute/Formatted.pm index c039fc7..b94e887 100644 --- a/lib/Bot/Games/Trait/Attribute/Formatted.pm +++ b/lib/Bot/Games/Trait/Attribute/Formatted.pm @@ -36,11 +36,13 @@ after _process_options => sub { my $class = shift; my ($name, $options) = @_; return if exists $options->{formatter}; + return unless $options->{command}; if (exists $options->{type_constraint}) { my $tc = $options->{type_constraint}; for my $tc_type (keys %default_formatters) { if ($tc->is_a_type_of($tc_type)) { $options->{formatter} = $default_formatters{$tc_type}; + return; } } } |