-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): v1.0.0-alpha.1 (#39)
- Loading branch information
Showing
40 changed files
with
980 additions
and
594 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"semi": false | ||
"trailingComma": "all", | ||
"singleQuote": true | ||
} |
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
export * from './pipe-context.decorator' | ||
export * from './telegram-action-handler.decorator' | ||
export * from './telegram-catch.decorator' | ||
export * from './telegraf-use.decorator'; | ||
export * from './telegraf-on.decorator'; | ||
export * from './telegraf-hears.decorator'; | ||
export * from './telegraf-command.decorator'; | ||
export * from './telegraf-start.decorator'; | ||
export * from './telegraf-help.decorator'; | ||
export * from './telegraf-settings.decorator'; | ||
export * from './telegraf-entity.decorator'; | ||
export * from './telegraf-mention.decorator'; | ||
export * from './telegraf-phone.decorator'; | ||
export * from './telegraf-hashtag.decorator'; | ||
export * from './telegraf-cashtag.decorator'; | ||
export * from './telegraf-action.decorator'; | ||
export * from './telegraf-inline-query.decorator'; | ||
export * from './telegraf-game-query.decorator'; |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import { SetMetadata } from '@nestjs/common'; | ||
import { DECORATORS } from '../telegraf.constants'; | ||
import { HearsTriggers } from 'telegraf'; | ||
|
||
export type TelegrafActionTriggers = HearsTriggers; | ||
|
||
export interface TelegrafActionMetadata { | ||
triggers: TelegrafActionTriggers; | ||
} | ||
|
||
/** | ||
* Registers middleware for handling callback_data actions with regular expressions. | ||
* @param triggers Triggers | ||
* | ||
* https://telegraf.js.org/#/?id=action | ||
*/ | ||
export function TelegrafAction( | ||
triggers: TelegrafActionTriggers, | ||
): MethodDecorator { | ||
return SetMetadata(DECORATORS.ACTION, { triggers }); | ||
} |
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,20 @@ | ||
import { SetMetadata } from '@nestjs/common'; | ||
import { DECORATORS } from '../telegraf.constants'; | ||
|
||
export type TelegrafCashtagCashtag = string | string[]; | ||
|
||
export interface TelegrafCashtagMetadata { | ||
cashtag: TelegrafCashtagCashtag; | ||
} | ||
|
||
/** | ||
* Cashtag handling. | ||
* @param cashtag Cashtag | ||
* | ||
* https://telegraf.js.org/#/?id=cashtag | ||
*/ | ||
export function TelegrafCashtag( | ||
cashtag: TelegrafCashtagCashtag, | ||
): MethodDecorator { | ||
return SetMetadata(DECORATORS.CASHTAG, { cashtag }); | ||
} |
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,20 @@ | ||
import { SetMetadata } from '@nestjs/common'; | ||
import { DECORATORS } from '../telegraf.constants'; | ||
|
||
export type TelegrafCommandCommands = string | string[]; | ||
|
||
export interface TelegrafCommandMetadata { | ||
commands: TelegrafCommandCommands; | ||
} | ||
|
||
/** | ||
* Command handling. | ||
* @param commands Commands | ||
* | ||
* https://telegraf.js.org/#/?id=command | ||
*/ | ||
export function TelegrafCommand( | ||
commands: TelegrafCommandCommands, | ||
): MethodDecorator { | ||
return SetMetadata(DECORATORS.COMMAND, { commands }); | ||
} |
Oops, something went wrong.