Skip to content

Commit

Permalink
chore: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RozmarinUS committed Jul 10, 2024
1 parent 6dcfc4f commit a985850
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 28 deletions.
51 changes: 25 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.yml
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.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

<!--
Please move lines that apply to you out of the comment:
- Code changes have been tested against the Discord API, or there are no code changes
- I know how to update typings and have done so, or typings don't need updating
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
Expand Down
2 changes: 1 addition & 1 deletion docs/content/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ the [Issues](https://github.com/GlobalArtInc/nestgram/issues/new?assignees=&labe
**Node.js 16.6.0 or newer is required.**

```bash npm2yarn
$ npm install @nestgramjs/core telegram
$ npm install @nestgramjs/core telegraf
```

28 changes: 28 additions & 0 deletions docs/content/listeners.md
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);
}
}
```

0 comments on commit a985850

Please sign in to comment.