Skip to content

Commit

Permalink
fix: make async
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyguerra committed Nov 12, 2023
1 parent aa9a81f commit 31b22a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/diagnostics.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
// Josh Nichols <[email protected]>

module.exports = function (robot) {
robot.respond(/PING$/i, msg => {
msg.send('PONG')
robot.respond(/PING$/i, async msg => {
await msg.send('PONG')
})

robot.respond(/ADAPTER$/i, msg => {
msg.send(robot.adapterName)
robot.respond(/ADAPTER$/i, async msg => {
await msg.send(robot.adapterName)
})
robot.respond(/ECHO ([\s\S]*)$/im, msg => {
msg.send(msg.match[1])
robot.respond(/ECHO ([\s\S]*)$/im, async msg => {
await msg.send(msg.match[1])
})

robot.respond(/TIME$/i, msg => {
msg.send(`Server time is: ${new Date()}`)
robot.respond(/TIME$/i, async msg => {
await msg.send(`Server time is: ${new Date()}`)
})
}

0 comments on commit 31b22a8

Please sign in to comment.