Send dice

You can send dice to get a random value

You can send dice with any emoji to get a random value. To send dice, use Dice class-method

Dice class-method take arguments:

ArgumentDescriptionRequired
1

Optional. 🎲 by default

2

Optional

app.controller.ts
import { Controller, OnCommand, Dice, } from 'nestgram';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @OnCommand('start')
  async getDice(): Promise<Dice> {
    return new Dice();
  }
}

Last updated