This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(telegram): add help for telegram bot
- Loading branch information
1 parent
0a5cb56
commit 983f9c2
Showing
7 changed files
with
51 additions
and
9 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
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,16 @@ | ||
import { Injectable } from '@nestjs/common' | ||
import { Context, TelegramActionHandler } from 'nest-telegram' | ||
|
||
import { Templating } from '@back/utils/infrastructure/Templating/Templating' | ||
|
||
@Injectable() | ||
export class HelpActions { | ||
public constructor(private readonly templating: Templating) {} | ||
|
||
@TelegramActionHandler({ command: '/help' }) | ||
public async income(ctx: Context) { | ||
const responseText = await this.templating.render('telegram/help', {}) | ||
|
||
await ctx.reply(responseText) | ||
} | ||
} |
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
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,14 @@ | ||
I am Checkmoney Robot | ||
|
||
My site — https://checkmoney.space | ||
Mirror — https://checkmoney.ml | ||
|
||
Available commands: | ||
|
||
To create outcome transaction: | ||
/outcome 100 usd Lunch | ||
|
||
To create income transaction: | ||
/income 10000 eur ESA | ||
|
||
Of course, you can use any amounts, currencies and comments. |
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,5 @@ | ||
Hello! | ||
|
||
{{#if loggedIn}}Welcome back{{else}}To auth send me "/auth login password"{{/if}} | ||
|
||
If you need help, just send me /help |