docs: rename package from nestjs-telegraf to @maks1ms/nestjs-telegraf (#4)

This commit is contained in:
Maxim Slipenko 2023-07-23 15:50:06 +03:00 committed by GitHub
parent dca35a0c7f
commit 76011e10eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 16 additions and 16 deletions

View File

@ -9,7 +9,7 @@ At times you may need to access the native `Telegraf` instance. You can inject t
```typescript {8} title="src/echo/echo.service.ts" ```typescript {8} title="src/echo/echo.service.ts"
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot } from 'nestjs-telegraf'; import { InjectBot } from '@maks1ms/nestjs-telegraf';
import { Telegraf } from 'telegraf'; import { Telegraf } from 'telegraf';
import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts';
@ -24,7 +24,7 @@ If you run [multiple bots](/extras/multiple-bots) in the same application, expli
```typescript {8} title="src/echo/echo.service.ts" ```typescript {8} title="src/echo/echo.service.ts"
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot } from 'nestjs-telegraf'; import { InjectBot } from '@maks1ms/nestjs-telegraf';
import { Telegraf } from 'telegraf'; import { Telegraf } from 'telegraf';
import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts';

View File

@ -9,7 +9,7 @@ In some cases, you may need to run multiple bots at the same time. This can also
```typescript ```typescript
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config'; import { ConfigModule } from '@nestjs/config';
import { TelegrafModule } from 'nestjs-telegraf'; import { TelegrafModule } from '@maks1ms/nestjs-telegraf';
@Module({ @Module({
imports: [ imports: [
@ -42,7 +42,7 @@ Please note that you shouldn't have multiple bots without a name, or with the sa
You can also inject the `Bot` for a given bot: You can also inject the `Bot` for a given bot:
```typescript ```typescript
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot, Telegraf, Context } from 'nestjs-telegraf'; import { InjectBot, Telegraf, Context } from @maks1ms/nestjs-telegraf';
@Injectable() @Injectable()
export class EchoService { export class EchoService {

View File

@ -15,7 +15,7 @@ If you want to configure a telegram bot webhook, you need to get a middleware vi
To access it, you must use the `app.get()` method, followed by the provider reference: To access it, you must use the `app.get()` method, followed by the provider reference:
```typescript ```typescript
import { getBotToken } from 'nestjs-telegraf'; import { getBotToken } from '@maks1ms/nestjs-telegraf';
// ... // ...
const bot = app.get(getBotToken()); const bot = app.get(getBotToken());

View File

@ -6,14 +6,14 @@ slug: /
--- ---
```bash ```bash
$ npm i maks1ms nestjs-telegraf telegraf $ npm i @maks1ms/nestjs-telegraf telegraf
``` ```
Once the installation process is complete, we can import the `TelegrafModule` into the root `AppModule`. Once the installation process is complete, we can import the `TelegrafModule` into the root `AppModule`.
```typescript title="src/app.module.ts" ```typescript title="src/app.module.ts"
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { TelegrafModule } from 'nestjs-telegraf'; import { TelegrafModule } from '@maks1ms/nestjs-telegraf';
@Module({ @Module({
imports: [ imports: [

View File

@ -17,7 +17,7 @@ import {
Help, Help,
On, On,
Hears, Hears,
} from 'nestjs-telegraf'; } from '@maks1ms/nestjs-telegraf';
import { TelegrafContext } from './common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from './common/interfaces/telegraf-context.interface.ts';
@Update() @Update()

View File

@ -9,7 +9,7 @@ At times you may need to access the native `Telegraf` instance. You can inject t
```typescript {8} title="src/echo/echo.service.ts" ```typescript {8} title="src/echo/echo.service.ts"
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot } from 'nestjs-telegraf'; import { InjectBot } from '@maks1ms/nestjs-telegraf';
import { Telegraf } from 'telegraf'; import { Telegraf } from 'telegraf';
import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts';
@ -24,7 +24,7 @@ If you run [multiple bots](/extras/multiple-bots) in the same application, expli
```typescript {8} title="src/echo/echo.service.ts" ```typescript {8} title="src/echo/echo.service.ts"
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot } from 'nestjs-telegraf'; import { InjectBot } from '@maks1ms/nestjs-telegraf';
import { Telegraf } from 'telegraf'; import { Telegraf } from 'telegraf';
import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from '../common/interfaces/telegraf-context.interface.ts';

View File

@ -9,7 +9,7 @@ In some cases, you may need to run multiple bots at the same time. This can also
```typescript ```typescript
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config'; import { ConfigModule } from '@nestjs/config';
import { TelegrafModule } from 'nestjs-telegraf'; import { TelegrafModule } from '@maks1ms/nestjs-telegraf';
@Module({ @Module({
imports: [ imports: [
@ -42,7 +42,7 @@ Please note that you shouldn't have multiple bots without a name, or with the sa
You can also inject the `Bot` for a given bot: You can also inject the `Bot` for a given bot:
```typescript ```typescript
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { InjectBot, Telegraf, Context } from 'nestjs-telegraf'; import { InjectBot, Telegraf, Context } from @maks1ms/nestjs-telegraf';
@Injectable() @Injectable()
export class EchoService { export class EchoService {

View File

@ -15,7 +15,7 @@ If you want to configure a telegram bot webhook, you need to get a middleware vi
To access it, you must use the `app.get()` method, followed by the provider reference: To access it, you must use the `app.get()` method, followed by the provider reference:
```typescript ```typescript
import { getBotToken } from 'nestjs-telegraf'; import { getBotToken } from '@maks1ms/nestjs-telegraf';
// ... // ...
const bot = app.get(getBotToken()); const bot = app.get(getBotToken());

View File

@ -6,14 +6,14 @@ slug: /
--- ---
```bash ```bash
$ npm i nestjs-telegraf telegraf $ npm i @maks1ms/nestjs-telegraf telegraf
``` ```
Once the installation process is complete, we can import the `TelegrafModule` into the root `AppModule`. Once the installation process is complete, we can import the `TelegrafModule` into the root `AppModule`.
```typescript title="src/app.module.ts" ```typescript title="src/app.module.ts"
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { TelegrafModule } from 'nestjs-telegraf'; import { TelegrafModule } from '@maks1ms/nestjs-telegraf';
@Module({ @Module({
imports: [ imports: [

View File

@ -17,7 +17,7 @@ import {
Help, Help,
On, On,
Hears, Hears,
} from 'nestjs-telegraf'; } from '@maks1ms/nestjs-telegraf';
import { TelegrafContext } from './common/interfaces/telegraf-context.interface.ts'; import { TelegrafContext } from './common/interfaces/telegraf-context.interface.ts';
@Update() @Update()