# Pastebin rpYODJkQ my %COMMANDS = rank => &rank, add-level => &add-level, rm-level => &rm-level, list-levels => &list-levels, purge-roles => &purge-roles, ; sub handle-command($message, $trimmed-message) is export { $trimmed-message ~~ /(\S+) [ \s+ (.*) ]?/; my $command = $/[0]; if %COMMANDS{$command} -> $sub { $sub($/[1] // '', $message) } }