Skip to content

Commit

Permalink
add !version command
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Mar 5, 2020
1 parent 1bb7b6e commit 472cd21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/dialog-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { SuperEvent } from './super-event'

import {
log,
VERSION,
} from './config'

import { AppserviceManager } from './appservice-manager'
Expand Down Expand Up @@ -102,6 +103,12 @@ export class DialogManager extends Manager {
superEvent.room(),
)

} else if (/^!version$/i.test(text)) {
log.verbose('MatrixHandler', 'gotoSetupDialog() !version')
await this.appserviceManager.sendMessage(
`version: ${VERSION}`,
superEvent.room(),
)
} else {
const help = [
'Avaiable commands: !login, !logout',
Expand Down

0 comments on commit 472cd21

Please sign in to comment.