diff --git a/bot.ps1 b/bot.ps1 index ce585b1..329bf4c 100755 --- a/bot.ps1 +++ b/bot.ps1 @@ -234,7 +234,7 @@ function Open-JoinEvent { } #the "ball" is a string returned by the bot - if($Event.content.msgtype -eq 'm.text' -and $Event.content.body -match '^!ping( (?.*))?') { + if($Event.content.msgtype -eq 'm.text' -and $Event.content.body -match '^!ping($| (?.*))') { $difference = Measure-TimeDifference -OriginTime $origin_time $readable_timespan = ConvertTo-HumanReadableTimespan -TimeSpan $difference