a [matrix] ping bot in PowerShell
  • PowerShell 99.3%
  • Dockerfile 0.7%
Find a file
2021-06-04 22:28:27 +02:00
bot.ps1 increase duration to int64 2021-06-04 22:28:27 +02:00
Dockerfile switch to latest tag in Dockerfile 2020-11-25 13:57:24 +01:00
LICENSE.md add LICENSE.md 2019-11-22 22:21:27 +01:00
README.md add readme 2020-01-03 13:41:28 +01:00

You can discuss this bot in #pingposh:imninja.net

This is a simple Matrix bot to participate in #ping:maunium.net

Features

It automatically joins on invites. If someone sends a !ping or !ping <text>, it echoes back an m.notice with the following attributes:

"pong": {
      "ms": <difference of origin_server_ts and now>,
      "from": "<origin homeserver>",
      "ping": "<!ping event>"
}

Configuration

It is configured via command line parameters or environment variables. Have a look at the param block at the beginning of bot.ps1 for all configuration options.

Example configuration with environment variables:

HOMESERVER: 'http://synapse:8008'
USERID: '@pingposh:imninja.net'
ACCESSTOKEN_FILE: '/run/secrets/pingposh_accesstoken'
UNENCRYPTED: 'TRUE'