-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: /sealpending command for employees
- Loading branch information
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ICommand } from '../types' | ||
|
||
export const command:ICommand = { | ||
name: 'sealpending', | ||
description: 'write pending seals', | ||
examples: [ | ||
'/sealpending' | ||
], | ||
exec: async ({ commander, req, ctx, args }) => { | ||
try { | ||
return await commander.bot.seals.sealPending() | ||
} catch (err) { | ||
commander.logger.error('failed to write pending seals', err) | ||
return [] | ||
} | ||
}, | ||
sendResult: async ({ commander, req, to, result }) => { | ||
// TODO: link to application | ||
await commander.sendSimpleMessage({ | ||
req, | ||
to, | ||
message: `sealed ${result.length} pending seals` | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters