diff options
-rw-r--r-- | lib/Bot/Games/Game.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Bot/Games/Game.pm b/lib/Bot/Games/Game.pm index 7f68b71..8af0baf 100644 --- a/lib/Bot/Games/Game.pm +++ b/lib/Bot/Games/Game.pm @@ -76,8 +76,12 @@ command cmdlist => sub { if $method->meta->can('does_role') && $method->meta->does_role('Bot::Games::Trait::Method::Command'); } - return join ' ', sort map { '-' . $_ } @commands; -}, needs_init => 0; + return @commands; +}, needs_init => 0, + formatter => sub { + my $list = shift; + return join ' ', sort map { '-' . $_ } @$list + }; # XXX: this would be much nicer as an external module, but the only one that # really does what i want (DateTime::Format::Human::Duration) has only had one |