Update to Telegraf v4.0.0 (#212)

* feat(telegraf): update to v4.0.0

* chore(lock): update package-lock

* chore(deps): remove telegraf from dependencies

* chore(readme): update installation command

* chore(deps): add telegraf to dev dependencies
This commit is contained in:
Morbo
2021-01-11 16:17:32 +03:00
committed by GitHub
parent b16f0b9fa5
commit 663ebf1a62
21 changed files with 185 additions and 239 deletions

View File

@@ -3,8 +3,8 @@ import { TelegrafModuleOptions } from '../interfaces';
export async function createBotFactory(
options: TelegrafModuleOptions,
): Promise<Telegraf<never>> {
const bot = new Telegraf<never>(options.token, options.options);
): Promise<Telegraf<any>> {
const bot = new Telegraf<any>(options.token, options.options);
bot.use(...(options.middlewares ?? []));
await bot.launch(options.launchOptions);