-
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.
- Loading branch information
1 parent
6dcfc4f
commit a985850
Showing
4 changed files
with
54 additions
and
28 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,29 +1,28 @@ | ||
name: 🚀 Feature request | ||
description: Request a new feature (documented features of the official Discord developer API only!) | ||
description: Request a new feature | ||
labels: [feature request] | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Feature | ||
description: A clear and concise description of what the problem is, or what feature you want to be implemented. | ||
placeholder: I'm always frustrated when..., Discord has recently released..., A good addition would be... | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Ideal solution or implementation | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Alternative solutions or implementations | ||
description: A clear and concise description of any alternative solutions or features you have considered. | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Other context | ||
description: Any other context, screenshots, or file uploads that help us understand your feature request. | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Feature | ||
description: A clear and concise description of what the problem is, or what feature you want to be implemented. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Ideal solution or implementation | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Alternative solutions or implementations | ||
description: A clear and concise description of any alternative solutions or features you have considered. | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Other context | ||
description: Any other context, screenshots, or file uploads that help us understand your feature request. |
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,28 @@ | ||
--- | ||
id: listeners | ||
|
||
slug: listeners | ||
|
||
title: Listeners | ||
|
||
description: Listeners are used to listen to events emitted by Telegram. | ||
|
||
sidebar_position: 3 | ||
--- | ||
|
||
NestGram supports interacting with all [telegram events](https://telegraf.js.org/classes/Composer.html#on-3) via the `@On` decorator. | ||
|
||
```typescript title="src/app.service.ts" | ||
import {Injectable, Logger} from '@nestjs/common'; | ||
import {On, Context, ContextOf} from '@nestgramjs/core'; | ||
|
||
@Injectable() | ||
export class AppService { | ||
private readonly logger = new Logger(AppService.name); | ||
|
||
@On('message') | ||
async onMessage(@Context() [ctx]: ContextOf<'message'>) { | ||
this.logger.log(ctx); | ||
} | ||
} | ||
``` |