# Pastebin gsqHrZul method purge-messages($cmd-obj) { my %payload = $cmd-obj.payload; my $channel = %payload; my $how-many = $cmd-obj.args; unless $how-many ~~ / <(\d+)> / { return content => 'You must provide an Int value for this command.'; } my @messages = (await $channel).fetch-messages($how-many); return content => @messages; }