Scopes
IN DEVELOPMENT. You can enter/leave scope
What's scopes?
If you want to ask user something, you need to use scope. Scope - an isolated place for the user, in which the handlers of ordinary controllers don't work, but only the handlers described in the scope work
How it works?
You call the .scope answer method. Then all custom updates are handled by scope handlers, other handlers don't. You can leave at any time, just call the .unscope answer method
Example
import { Module } from 'nestgram';
import { AppService } from './app.service';
import { AppController } from './app.controller';
import { NameModule } from './scopes/name/name.module';
@Module({
imports: [NameModule],
controllers: [AppController],
services: [AppService],
})
export class AppModule {}On scope enter event
You can handle when the user enters the scope with the @OnEnter decorator
Last updated