ts-telegraf-decorators
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
import 'reflect-metadata'; |
@@ -0,0 +0,0 @@ import { TestService } from "../services/TestService"; |
@@ -0,0 +0,0 @@ export declare class ControllerTestScene { |
export declare class TestService { | ||
getBotName(): Promise<string>; | ||
} |
import { IBotOptions } from "./interfaces/IBotOptions"; | ||
export declare function buildFromMetadata(bot: any, options: IBotOptions): any; |
@@ -0,0 +0,0 @@ export declare type Container = { |
@@ -0,0 +0,0 @@ import * as tt from "telegraf/typings/telegram-types"; |
@@ -0,0 +0,0 @@ import { IBotOptions } from "./interfaces/IBotOptions"; |
@@ -0,0 +0,0 @@ import { Container } from "../container"; |
@@ -0,0 +0,0 @@ import { HearsTriggers } from "telegraf"; |
@@ -0,0 +0,0 @@ export declare class CommandMetadata { |
@@ -0,0 +0,0 @@ export declare class ControllerMetadata { |
@@ -0,0 +0,0 @@ export declare class EnterMetadata { |
@@ -0,0 +0,0 @@ import { HearsTriggers } from "telegraf"; |
@@ -0,0 +0,0 @@ export declare class HelpMetadata { |
@@ -0,0 +0,0 @@ export * from './EnterMetadata'; |
@@ -0,0 +0,0 @@ export declare class LeaveMetadata { |
@@ -0,0 +0,0 @@ import * as tt from "telegraf/typings/telegram-types"; |
@@ -0,0 +0,0 @@ export declare class ParamsMetadata { |
@@ -0,0 +0,0 @@ export declare class StartMetadata { |
@@ -0,0 +0,0 @@ import { StartMetadata } from "./metadata/StartMetadata"; |
{ | ||
"name": "ts-telegraf-decorators", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Ivan Surkov <panarama360@gmail.com>", | ||
@@ -21,7 +21,7 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"glob": "^7.1.3", | ||
"reflect-metadata": "^0.1.12", | ||
"telegraf": "^3.23.1", | ||
"glob": "^7.1.4", | ||
"reflect-metadata": "^0.1.13", | ||
"telegraf": "^3.32.0", | ||
"typedi": "^0.8.0" | ||
} | ||
} |
@@ -22,3 +22,3 @@ # ts-telegraf-decorators | ||
@Start() | ||
start(ctx: any){ | ||
start(@TFContext() ctx){ | ||
ctx.reply('Hello start') | ||
@@ -28,3 +28,3 @@ } | ||
@Command('ping') | ||
ping(ctx: any){ | ||
ping(@TFContext() ctx){ | ||
ctx.reply('pong') | ||
@@ -99,3 +99,3 @@ } | ||
@Start() | ||
start(ctx: any){ | ||
start(@TFContext() ctx){ | ||
ctx.reply('Hello start') | ||
@@ -105,5 +105,5 @@ } | ||
@Command('ping') | ||
async ping(ctx: any){ | ||
async ping(@TFContext() ctx){ | ||
ctx.reply('pong '+ await this.service.getBotName()) | ||
} | ||
} |
@@ -0,0 +0,0 @@ import 'reflect-metadata' |
@@ -0,0 +0,0 @@ import { |
@@ -0,0 +0,0 @@ import {TFController, Start, Command, On, Hears, Help, Enter} from '../../src/decorators' |
@@ -0,0 +0,0 @@ import {Service} from "typedi"; |
@@ -0,0 +0,0 @@ import MetadataStorage from "./MetadataStorage"; |
@@ -0,0 +0,0 @@ export type Container = { get<T>(someClass: { new (...args: any[]): T }|Function): T, set<T>(someClass: { new (...args: any[]): T }, instance: T) } |
@@ -0,0 +0,0 @@ import MetadataStorage from "./MetadataStorage"; |
@@ -0,0 +0,0 @@ import Telegraf, {ContextMessageUpdate} from 'telegraf' |
@@ -0,0 +0,0 @@ import {Container} from "../container"; |
@@ -0,0 +0,0 @@ import {HearsTriggers} from "telegraf"; |
@@ -0,0 +0,0 @@ export class CommandMetadata { |
@@ -0,0 +0,0 @@ export class ControllerMetadata { |
@@ -0,0 +0,0 @@ export class EnterMetadata { |
@@ -0,0 +0,0 @@ import {HearsTriggers} from "telegraf"; |
@@ -0,0 +0,0 @@ export class HelpMetadata { |
@@ -0,0 +0,0 @@ export * from './EnterMetadata' |
@@ -0,0 +0,0 @@ export class LeaveMetadata { |
@@ -0,0 +0,0 @@ import * as tt from "telegraf/typings/telegram-types"; |
@@ -0,0 +0,0 @@ export class ParamsMetadata { |
@@ -0,0 +0,0 @@ export class StartMetadata { |
@@ -0,0 +0,0 @@ import {StartMetadata} from "./metadata/StartMetadata"; |
@@ -0,0 +0,0 @@ { |
52999
67
1167
Updatedglob@^7.1.4
Updatedreflect-metadata@^0.1.13
Updatedtelegraf@^3.32.0