chz-telegram-bot 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dtos/chatHistoryMessage.ts +9 -1
- package/entities/botInstance.ts +1 -1
- package/entities/context/messageContext.ts +3 -3
- package/entities/context/replyContext.ts +3 -3
- package/{eslint.config.js → eslint.config.ts} +8 -5
- package/index.ts +3 -0
- package/package.json +38 -37
- package/services/actionProcessors/commandActionProcessor.ts +7 -7
- package/services/jsonFileStorage.ts +1 -1
- package/services/nodeTimeoutScheduler.ts +2 -2
- package/tsconfig.json +2 -2
- package/bun.lock +0 -301
- package/dist/builtin/helpAction.d.ts +0 -2
- package/dist/builtin/helpAction.d.ts.map +0 -1
- package/dist/builtin/helpAction.js +0 -17
- package/dist/dtos/chatHistoryMessage.d.ts +0 -13
- package/dist/dtos/chatHistoryMessage.d.ts.map +0 -1
- package/dist/dtos/chatHistoryMessage.js +0 -20
- package/dist/dtos/chatInfo.d.ts +0 -17
- package/dist/dtos/chatInfo.d.ts.map +0 -1
- package/dist/dtos/chatInfo.js +0 -20
- package/dist/dtos/commandTriggerCheckResult.d.ts +0 -24
- package/dist/dtos/commandTriggerCheckResult.d.ts.map +0 -1
- package/dist/dtos/commandTriggerCheckResult.js +0 -38
- package/dist/dtos/cooldownInfo.d.ts +0 -13
- package/dist/dtos/cooldownInfo.d.ts.map +0 -1
- package/dist/dtos/cooldownInfo.js +0 -16
- package/dist/dtos/incomingMessage.d.ts +0 -19
- package/dist/dtos/incomingMessage.d.ts.map +0 -1
- package/dist/dtos/incomingMessage.js +0 -67
- package/dist/dtos/incomingQuery.d.ts +0 -10
- package/dist/dtos/incomingQuery.d.ts.map +0 -1
- package/dist/dtos/incomingQuery.js +0 -18
- package/dist/dtos/messageInfo.d.ts +0 -22
- package/dist/dtos/messageInfo.d.ts.map +0 -1
- package/dist/dtos/messageInfo.js +0 -24
- package/dist/dtos/propertyProviderSets.d.ts +0 -16
- package/dist/dtos/propertyProviderSets.d.ts.map +0 -1
- package/dist/dtos/propertyProviderSets.js +0 -2
- package/dist/dtos/replyInfo.d.ts +0 -6
- package/dist/dtos/replyInfo.d.ts.map +0 -1
- package/dist/dtos/replyInfo.js +0 -12
- package/dist/dtos/responses/delay.d.ts +0 -16
- package/dist/dtos/responses/delay.d.ts.map +0 -1
- package/dist/dtos/responses/delay.js +0 -19
- package/dist/dtos/responses/imageMessage.d.ts +0 -22
- package/dist/dtos/responses/imageMessage.d.ts.map +0 -1
- package/dist/dtos/responses/imageMessage.js +0 -25
- package/dist/dtos/responses/inlineQueryResponse.d.ts +0 -13
- package/dist/dtos/responses/inlineQueryResponse.d.ts.map +0 -1
- package/dist/dtos/responses/inlineQueryResponse.js +0 -19
- package/dist/dtos/responses/reaction.d.ts +0 -16
- package/dist/dtos/responses/reaction.d.ts.map +0 -1
- package/dist/dtos/responses/reaction.js +0 -21
- package/dist/dtos/responses/textMessage.d.ts +0 -23
- package/dist/dtos/responses/textMessage.d.ts.map +0 -1
- package/dist/dtos/responses/textMessage.js +0 -28
- package/dist/dtos/responses/unpin.d.ts +0 -15
- package/dist/dtos/responses/unpin.d.ts.map +0 -1
- package/dist/dtos/responses/unpin.js +0 -19
- package/dist/dtos/responses/videoMessage.d.ts +0 -22
- package/dist/dtos/responses/videoMessage.d.ts.map +0 -1
- package/dist/dtos/responses/videoMessage.js +0 -25
- package/dist/dtos/userInfo.d.ts +0 -12
- package/dist/dtos/userInfo.d.ts.map +0 -1
- package/dist/dtos/userInfo.js +0 -16
- package/dist/entities/actions/commandAction.d.ts +0 -31
- package/dist/entities/actions/commandAction.d.ts.map +0 -1
- package/dist/entities/actions/commandAction.js +0 -146
- package/dist/entities/actions/inlineQueryAction.d.ts +0 -14
- package/dist/entities/actions/inlineQueryAction.d.ts.map +0 -1
- package/dist/entities/actions/inlineQueryAction.js +0 -47
- package/dist/entities/actions/replyCaptureAction.d.ts +0 -15
- package/dist/entities/actions/replyCaptureAction.d.ts.map +0 -1
- package/dist/entities/actions/replyCaptureAction.js +0 -62
- package/dist/entities/actions/scheduledAction.d.ts +0 -24
- package/dist/entities/actions/scheduledAction.d.ts.map +0 -1
- package/dist/entities/actions/scheduledAction.js +0 -79
- package/dist/entities/botInstance.d.ts +0 -37
- package/dist/entities/botInstance.d.ts.map +0 -1
- package/dist/entities/botInstance.js +0 -41
- package/dist/entities/cachedStateFactory.d.ts +0 -7
- package/dist/entities/cachedStateFactory.d.ts.map +0 -1
- package/dist/entities/cachedStateFactory.js +0 -12
- package/dist/entities/context/baseContext.d.ts +0 -39
- package/dist/entities/context/baseContext.d.ts.map +0 -1
- package/dist/entities/context/baseContext.js +0 -59
- package/dist/entities/context/chatContext.d.ts +0 -50
- package/dist/entities/context/chatContext.d.ts.map +0 -1
- package/dist/entities/context/chatContext.js +0 -69
- package/dist/entities/context/inlineQueryContext.d.ts +0 -27
- package/dist/entities/context/inlineQueryContext.d.ts.map +0 -1
- package/dist/entities/context/inlineQueryContext.js +0 -33
- package/dist/entities/context/messageContext.d.ts +0 -92
- package/dist/entities/context/messageContext.d.ts.map +0 -1
- package/dist/entities/context/messageContext.js +0 -120
- package/dist/entities/context/replyContext.d.ts +0 -89
- package/dist/entities/context/replyContext.d.ts.map +0 -1
- package/dist/entities/context/replyContext.js +0 -128
- package/dist/entities/states/actionStateBase.d.ts +0 -6
- package/dist/entities/states/actionStateBase.d.ts.map +0 -1
- package/dist/entities/states/actionStateBase.js +0 -8
- package/dist/entities/taskRecord.d.ts +0 -8
- package/dist/entities/taskRecord.d.ts.map +0 -1
- package/dist/entities/taskRecord.js +0 -14
- package/dist/helpers/builders/commandActionBuilder.d.ts +0 -100
- package/dist/helpers/builders/commandActionBuilder.d.ts.map +0 -1
- package/dist/helpers/builders/commandActionBuilder.js +0 -151
- package/dist/helpers/builders/inlineQueryActionBuilder.d.ts +0 -37
- package/dist/helpers/builders/inlineQueryActionBuilder.d.ts.map +0 -1
- package/dist/helpers/builders/inlineQueryActionBuilder.js +0 -54
- package/dist/helpers/builders/scheduledActionBuilder.d.ts +0 -68
- package/dist/helpers/builders/scheduledActionBuilder.d.ts.map +0 -1
- package/dist/helpers/builders/scheduledActionBuilder.js +0 -100
- package/dist/helpers/mapUtils.d.ts +0 -10
- package/dist/helpers/mapUtils.d.ts.map +0 -1
- package/dist/helpers/mapUtils.js +0 -17
- package/dist/helpers/noop.d.ts +0 -9
- package/dist/helpers/noop.d.ts.map +0 -1
- package/dist/helpers/noop.js +0 -21
- package/dist/helpers/objectFromEntries.d.ts +0 -2
- package/dist/helpers/objectFromEntries.d.ts.map +0 -1
- package/dist/helpers/objectFromEntries.js +0 -7
- package/dist/helpers/timeConvertions.d.ts +0 -5
- package/dist/helpers/timeConvertions.d.ts.map +0 -1
- package/dist/helpers/timeConvertions.js +0 -14
- package/dist/helpers/toArray.d.ts +0 -2
- package/dist/helpers/toArray.d.ts.map +0 -1
- package/dist/helpers/toArray.js +0 -6
- package/dist/helpers/traceFactory.d.ts +0 -3
- package/dist/helpers/traceFactory.d.ts.map +0 -1
- package/dist/helpers/traceFactory.js +0 -6
- package/dist/index.d.ts +0 -24
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -41
- package/dist/main.d.ts +0 -52
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js +0 -37
- package/dist/services/actionProcessingService.d.ts +0 -25
- package/dist/services/actionProcessingService.d.ts.map +0 -1
- package/dist/services/actionProcessingService.js +0 -54
- package/dist/services/actionProcessors/baseProcessor.d.ts +0 -18
- package/dist/services/actionProcessors/baseProcessor.d.ts.map +0 -1
- package/dist/services/actionProcessors/baseProcessor.js +0 -33
- package/dist/services/actionProcessors/commandActionProcessor.d.ts +0 -20
- package/dist/services/actionProcessors/commandActionProcessor.d.ts.map +0 -1
- package/dist/services/actionProcessors/commandActionProcessor.js +0 -119
- package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts +0 -11
- package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts.map +0 -1
- package/dist/services/actionProcessors/inlineQueryActionProcessor.js +0 -65
- package/dist/services/actionProcessors/scheduledActionProcessor.d.ts +0 -17
- package/dist/services/actionProcessors/scheduledActionProcessor.d.ts.map +0 -1
- package/dist/services/actionProcessors/scheduledActionProcessor.js +0 -63
- package/dist/services/jsonFileStorage.d.ts +0 -23
- package/dist/services/jsonFileStorage.d.ts.map +0 -1
- package/dist/services/jsonFileStorage.js +0 -113
- package/dist/services/jsonLogger.d.ts +0 -11
- package/dist/services/jsonLogger.d.ts.map +0 -1
- package/dist/services/jsonLogger.js +0 -70
- package/dist/services/nodeTimeoutScheduler.d.ts +0 -13
- package/dist/services/nodeTimeoutScheduler.d.ts.map +0 -1
- package/dist/services/nodeTimeoutScheduler.js +0 -35
- package/dist/services/responseProcessingQueue.d.ts +0 -12
- package/dist/services/responseProcessingQueue.d.ts.map +0 -1
- package/dist/services/responseProcessingQueue.js +0 -41
- package/dist/services/telegramApi.d.ts +0 -23
- package/dist/services/telegramApi.d.ts.map +0 -1
- package/dist/services/telegramApi.js +0 -137
- package/dist/types/action.d.ts +0 -14
- package/dist/types/action.d.ts.map +0 -1
- package/dist/types/action.js +0 -2
- package/dist/types/actionState.d.ts +0 -5
- package/dist/types/actionState.d.ts.map +0 -1
- package/dist/types/actionState.js +0 -2
- package/dist/types/cachedValueAccessor.d.ts +0 -2
- package/dist/types/cachedValueAccessor.d.ts.map +0 -1
- package/dist/types/cachedValueAccessor.js +0 -2
- package/dist/types/capture.d.ts +0 -24
- package/dist/types/capture.d.ts.map +0 -1
- package/dist/types/capture.js +0 -2
- package/dist/types/commandCondition.d.ts +0 -8
- package/dist/types/commandCondition.d.ts.map +0 -1
- package/dist/types/commandCondition.js +0 -2
- package/dist/types/commandTrigger.d.ts +0 -2
- package/dist/types/commandTrigger.d.ts.map +0 -1
- package/dist/types/commandTrigger.js +0 -2
- package/dist/types/externalAliases.d.ts +0 -11
- package/dist/types/externalAliases.d.ts.map +0 -1
- package/dist/types/externalAliases.js +0 -2
- package/dist/types/handlers.d.ts +0 -21
- package/dist/types/handlers.d.ts.map +0 -1
- package/dist/types/handlers.js +0 -2
- package/dist/types/inputFile.d.ts +0 -5
- package/dist/types/inputFile.d.ts.map +0 -1
- package/dist/types/inputFile.js +0 -2
- package/dist/types/logger.d.ts +0 -13
- package/dist/types/logger.d.ts.map +0 -1
- package/dist/types/logger.js +0 -2
- package/dist/types/messageSendingOptions.d.ts +0 -9
- package/dist/types/messageSendingOptions.d.ts.map +0 -1
- package/dist/types/messageSendingOptions.js +0 -2
- package/dist/types/messageTypes.d.ts +0 -20
- package/dist/types/messageTypes.d.ts.map +0 -1
- package/dist/types/messageTypes.js +0 -21
- package/dist/types/propertyProvider.d.ts +0 -8
- package/dist/types/propertyProvider.d.ts.map +0 -1
- package/dist/types/propertyProvider.js +0 -2
- package/dist/types/response.d.ts +0 -39
- package/dist/types/response.d.ts.map +0 -1
- package/dist/types/response.js +0 -12
- package/dist/types/scheduler.d.ts +0 -7
- package/dist/types/scheduler.d.ts.map +0 -1
- package/dist/types/scheduler.js +0 -2
- package/dist/types/storage.d.ts +0 -11
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/storage.js +0 -2
- package/dist/types/timeValues.d.ts +0 -15
- package/dist/types/timeValues.d.ts.map +0 -1
- package/dist/types/timeValues.js +0 -2
- package/dist/types/trace.d.ts +0 -6
- package/dist/types/trace.d.ts.map +0 -1
- package/dist/types/trace.js +0 -2
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TelegramUser } from '../types/externalAliases';
|
|
2
|
-
import { MessageTypeValue } from '../types/messageTypes';
|
|
3
|
-
import { TraceId } from '../types/trace';
|
|
4
|
-
export declare class ChatHistoryMessage {
|
|
5
|
-
readonly id: number;
|
|
6
|
-
readonly from: TelegramUser | undefined;
|
|
7
|
-
readonly text: string;
|
|
8
|
-
readonly type: MessageTypeValue;
|
|
9
|
-
readonly traceId: TraceId;
|
|
10
|
-
readonly replyToId: number | undefined;
|
|
11
|
-
constructor(id: number, from: TelegramUser | undefined, text: string, type: MessageTypeValue, traceId: TraceId, replyToId: number | undefined);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=chatHistoryMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatHistoryMessage.d.ts","sourceRoot":"","sources":["../../dtos/chatHistoryMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,kBAAkB;IAEvB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;gBAL7B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS;CAE7C"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatHistoryMessage = void 0;
|
|
4
|
-
class ChatHistoryMessage {
|
|
5
|
-
id;
|
|
6
|
-
from;
|
|
7
|
-
text;
|
|
8
|
-
type;
|
|
9
|
-
traceId;
|
|
10
|
-
replyToId;
|
|
11
|
-
constructor(id, from, text, type, traceId, replyToId) {
|
|
12
|
-
this.id = id;
|
|
13
|
-
this.from = from;
|
|
14
|
-
this.text = text;
|
|
15
|
-
this.type = type;
|
|
16
|
-
this.traceId = traceId;
|
|
17
|
-
this.replyToId = replyToId;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ChatHistoryMessage = ChatHistoryMessage;
|
package/dist/dtos/chatInfo.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChatHistoryMessage } from './chatHistoryMessage';
|
|
2
|
-
export declare class ChatInfo {
|
|
3
|
-
/** Id of a chat that action is executed in. */
|
|
4
|
-
readonly id: number;
|
|
5
|
-
/** Name of a chat that action is executed in. */
|
|
6
|
-
readonly name: string;
|
|
7
|
-
/** Last 100 messages in chat where action is executed */
|
|
8
|
-
readonly messageHistory: ChatHistoryMessage[];
|
|
9
|
-
constructor(
|
|
10
|
-
/** Id of a chat that action is executed in. */
|
|
11
|
-
id: number,
|
|
12
|
-
/** Name of a chat that action is executed in. */
|
|
13
|
-
name: string,
|
|
14
|
-
/** Last 100 messages in chat where action is executed */
|
|
15
|
-
messageHistory: ChatHistoryMessage[]);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=chatInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chatInfo.d.ts","sourceRoot":"","sources":["../../dtos/chatInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,qBAAa,QAAQ;IAEb,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,iDAAiD;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,yDAAyD;IACzD,QAAQ,CAAC,cAAc,EAAE,kBAAkB,EAAE;;IAL7C,+CAA+C;IACtC,EAAE,EAAE,MAAM;IACnB,iDAAiD;IACxC,IAAI,EAAE,MAAM;IACrB,yDAAyD;IAChD,cAAc,EAAE,kBAAkB,EAAE;CAEpD"}
|
package/dist/dtos/chatInfo.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChatInfo = void 0;
|
|
4
|
-
class ChatInfo {
|
|
5
|
-
id;
|
|
6
|
-
name;
|
|
7
|
-
messageHistory;
|
|
8
|
-
constructor(
|
|
9
|
-
/** Id of a chat that action is executed in. */
|
|
10
|
-
id,
|
|
11
|
-
/** Name of a chat that action is executed in. */
|
|
12
|
-
name,
|
|
13
|
-
/** Last 100 messages in chat where action is executed */
|
|
14
|
-
messageHistory) {
|
|
15
|
-
this.id = id;
|
|
16
|
-
this.name = name;
|
|
17
|
-
this.messageHistory = messageHistory;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ChatInfo = ChatInfo;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const _SkipTriggerReasonsObject: {
|
|
2
|
-
readonly UserIdMissing: "UserIdMissing";
|
|
3
|
-
readonly UserForbidden: "UserForbidden";
|
|
4
|
-
readonly OnCooldown: "OnCooldown";
|
|
5
|
-
readonly CustomConditionNotMet: "CustomConditionNotMet";
|
|
6
|
-
readonly TriggerNotSatisfied: "TriggerNotSatisfied";
|
|
7
|
-
readonly Other: "Other";
|
|
8
|
-
readonly ActionDisabled: "ActionDisabled";
|
|
9
|
-
readonly ChatForbidden: "ChatForbidden";
|
|
10
|
-
};
|
|
11
|
-
export type SkipTriggerReasons = keyof typeof _SkipTriggerReasonsObject;
|
|
12
|
-
export declare class CommandTriggerCheckResult {
|
|
13
|
-
readonly shouldExecute: boolean;
|
|
14
|
-
readonly matchResults: RegExpExecArray[];
|
|
15
|
-
readonly skipCooldown: boolean;
|
|
16
|
-
readonly reason?: SkipTriggerReasons | undefined;
|
|
17
|
-
static DontTriggerAndSkipCooldown(reason: SkipTriggerReasons): CommandTriggerCheckResult;
|
|
18
|
-
static DoNotTrigger(reason: SkipTriggerReasons): CommandTriggerCheckResult;
|
|
19
|
-
static Trigger(): CommandTriggerCheckResult;
|
|
20
|
-
constructor(shouldExecute: boolean, matchResults: RegExpExecArray[], skipCooldown: boolean, reason?: SkipTriggerReasons | undefined);
|
|
21
|
-
mergeWith(other: CommandTriggerCheckResult): CommandTriggerCheckResult;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=commandTriggerCheckResult.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandTriggerCheckResult.d.ts","sourceRoot":"","sources":["../../dtos/commandTriggerCheckResult.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,yBAAyB;;;;;;;;;CASrB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAExE,qBAAa,yBAAyB;IAY9B,QAAQ,CAAC,aAAa,EAAE,OAAO;IAC/B,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,kBAAkB;IAdxC,MAAM,CAAC,0BAA0B,CAAC,MAAM,EAAE,kBAAkB;IAG5D,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,kBAAkB;IAG9C,MAAM,CAAC,OAAO;gBAKD,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,eAAe,EAAE,EAC/B,YAAY,EAAE,OAAO,EACrB,MAAM,CAAC,EAAE,kBAAkB,YAAA;IAGxC,SAAS,CAAC,KAAK,EAAE,yBAAyB;CAQ7C"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommandTriggerCheckResult = void 0;
|
|
4
|
-
const _SkipTriggerReasonsObject = {
|
|
5
|
-
UserIdMissing: 'UserIdMissing',
|
|
6
|
-
UserForbidden: 'UserForbidden',
|
|
7
|
-
OnCooldown: 'OnCooldown',
|
|
8
|
-
CustomConditionNotMet: 'CustomConditionNotMet',
|
|
9
|
-
TriggerNotSatisfied: 'TriggerNotSatisfied',
|
|
10
|
-
Other: 'Other',
|
|
11
|
-
ActionDisabled: 'ActionDisabled',
|
|
12
|
-
ChatForbidden: 'ChatForbidden'
|
|
13
|
-
};
|
|
14
|
-
class CommandTriggerCheckResult {
|
|
15
|
-
shouldExecute;
|
|
16
|
-
matchResults;
|
|
17
|
-
skipCooldown;
|
|
18
|
-
reason;
|
|
19
|
-
static DontTriggerAndSkipCooldown(reason) {
|
|
20
|
-
return new CommandTriggerCheckResult(false, [], true, reason);
|
|
21
|
-
}
|
|
22
|
-
static DoNotTrigger(reason) {
|
|
23
|
-
return new CommandTriggerCheckResult(false, [], false, reason);
|
|
24
|
-
}
|
|
25
|
-
static Trigger() {
|
|
26
|
-
return new CommandTriggerCheckResult(true, [], false);
|
|
27
|
-
}
|
|
28
|
-
constructor(shouldExecute, matchResults, skipCooldown, reason) {
|
|
29
|
-
this.shouldExecute = shouldExecute;
|
|
30
|
-
this.matchResults = matchResults;
|
|
31
|
-
this.skipCooldown = skipCooldown;
|
|
32
|
-
this.reason = reason;
|
|
33
|
-
}
|
|
34
|
-
mergeWith(other) {
|
|
35
|
-
return new CommandTriggerCheckResult(this.shouldExecute || other.shouldExecute, this.matchResults.concat(other.matchResults), this.skipCooldown || other.skipCooldown, other.reason);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.CommandTriggerCheckResult = CommandTriggerCheckResult;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Seconds } from '../types/timeValues';
|
|
2
|
-
export declare class CooldownInfo {
|
|
3
|
-
/** Cooldown configuration */
|
|
4
|
-
readonly cooldown: Seconds;
|
|
5
|
-
/** Cooldown message to be shown */
|
|
6
|
-
readonly message?: string | undefined;
|
|
7
|
-
constructor(
|
|
8
|
-
/** Cooldown configuration */
|
|
9
|
-
cooldown: Seconds,
|
|
10
|
-
/** Cooldown message to be shown */
|
|
11
|
-
message?: string | undefined);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=cooldownInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cooldownInfo.d.ts","sourceRoot":"","sources":["../../dtos/cooldownInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,qBAAa,YAAY;IAEjB,6BAA6B;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAC1B,mCAAmC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM;;IAHzB,6BAA6B;IACpB,QAAQ,EAAE,OAAO;IAC1B,mCAAmC;IAC1B,OAAO,CAAC,EAAE,MAAM,YAAA;CAEhC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CooldownInfo = void 0;
|
|
4
|
-
class CooldownInfo {
|
|
5
|
-
cooldown;
|
|
6
|
-
message;
|
|
7
|
-
constructor(
|
|
8
|
-
/** Cooldown configuration */
|
|
9
|
-
cooldown,
|
|
10
|
-
/** Cooldown message to be shown */
|
|
11
|
-
message) {
|
|
12
|
-
this.cooldown = cooldown;
|
|
13
|
-
this.message = message;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.CooldownInfo = CooldownInfo;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MessageTypeValue } from '../types/messageTypes';
|
|
2
|
-
import { ChatInfo } from './chatInfo';
|
|
3
|
-
import { TraceId } from '../types/trace';
|
|
4
|
-
import { ChatHistoryMessage } from './chatHistoryMessage';
|
|
5
|
-
import { TelegramMessage, TelegramUser } from '../types/externalAliases';
|
|
6
|
-
export declare class IncomingMessage {
|
|
7
|
-
readonly messageId: number;
|
|
8
|
-
readonly chatInfo: ChatInfo;
|
|
9
|
-
readonly from: TelegramUser | undefined;
|
|
10
|
-
readonly text: string;
|
|
11
|
-
readonly type: MessageTypeValue;
|
|
12
|
-
readonly traceId: TraceId;
|
|
13
|
-
readonly replyToMessageId: number | undefined;
|
|
14
|
-
readonly updateObject: TelegramMessage;
|
|
15
|
-
private detectMessageType;
|
|
16
|
-
constructor(ctxMessage: TelegramMessage, botName: string, history: ChatHistoryMessage[]);
|
|
17
|
-
private getMessageText;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=incomingMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"incomingMessage.d.ts","sourceRoot":"","sources":["../../dtos/incomingMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEzE,qBAAa,eAAe;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9C,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IAEvC,OAAO,CAAC,iBAAiB;gBAmBrB,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,EAAE;IAyBjC,OAAO,CAAC,cAAc;CAKzB"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IncomingMessage = void 0;
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
|
-
const messageTypes_1 = require("../types/messageTypes");
|
|
6
|
-
const chatInfo_1 = require("./chatInfo");
|
|
7
|
-
const traceFactory_1 = require("../helpers/traceFactory");
|
|
8
|
-
class IncomingMessage {
|
|
9
|
-
messageId;
|
|
10
|
-
chatInfo;
|
|
11
|
-
from;
|
|
12
|
-
text;
|
|
13
|
-
type;
|
|
14
|
-
traceId;
|
|
15
|
-
replyToMessageId;
|
|
16
|
-
updateObject;
|
|
17
|
-
detectMessageType(message) {
|
|
18
|
-
if ('forward_origin' in message)
|
|
19
|
-
return messageTypes_1.MessageType.Forward;
|
|
20
|
-
if ('text' in message)
|
|
21
|
-
return messageTypes_1.MessageType.Text;
|
|
22
|
-
if ('video' in message)
|
|
23
|
-
return messageTypes_1.MessageType.Video;
|
|
24
|
-
if ('photo' in message)
|
|
25
|
-
return messageTypes_1.MessageType.Photo;
|
|
26
|
-
if ('sticker' in message)
|
|
27
|
-
return messageTypes_1.MessageType.Sticker;
|
|
28
|
-
if ('animation' in message)
|
|
29
|
-
return messageTypes_1.MessageType.Animation;
|
|
30
|
-
if ('voice' in message)
|
|
31
|
-
return messageTypes_1.MessageType.Voice;
|
|
32
|
-
if ('audio' in message)
|
|
33
|
-
return messageTypes_1.MessageType.Audio;
|
|
34
|
-
if ('document' in message)
|
|
35
|
-
return messageTypes_1.MessageType.Document;
|
|
36
|
-
if ('left_chat_member' in message)
|
|
37
|
-
return messageTypes_1.MessageType.LeftChatMember;
|
|
38
|
-
if ('new_chat_member' in message)
|
|
39
|
-
return messageTypes_1.MessageType.NewChatMember;
|
|
40
|
-
if ('poll' in message)
|
|
41
|
-
return messageTypes_1.MessageType.Poll;
|
|
42
|
-
if ('location' in message)
|
|
43
|
-
return messageTypes_1.MessageType.Location;
|
|
44
|
-
return messageTypes_1.MessageType.Unknown;
|
|
45
|
-
}
|
|
46
|
-
constructor(ctxMessage, botName, history) {
|
|
47
|
-
this.traceId = (0, traceFactory_1.createTrace)(this, botName, (0, crypto_1.randomInt)(10000, 99999).toString());
|
|
48
|
-
this.messageId = ctxMessage.message_id;
|
|
49
|
-
this.replyToMessageId =
|
|
50
|
-
'reply_to_message' in ctxMessage
|
|
51
|
-
? ctxMessage.reply_to_message?.message_id
|
|
52
|
-
: undefined;
|
|
53
|
-
this.from = ctxMessage.from;
|
|
54
|
-
this.text = this.getMessageText(ctxMessage);
|
|
55
|
-
this.chatInfo = new chatInfo_1.ChatInfo(ctxMessage.chat.id, 'title' in ctxMessage.chat
|
|
56
|
-
? `${ctxMessage.chat.title} ${ctxMessage.chat.id}`
|
|
57
|
-
: 'DM', history);
|
|
58
|
-
this.type = this.detectMessageType(ctxMessage);
|
|
59
|
-
this.updateObject = ctxMessage;
|
|
60
|
-
}
|
|
61
|
-
getMessageText(ctxMessage) {
|
|
62
|
-
if ('text' in ctxMessage)
|
|
63
|
-
return ctxMessage.text;
|
|
64
|
-
return 'caption' in ctxMessage ? ctxMessage.caption ?? '' : '';
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.IncomingMessage = IncomingMessage;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TraceId } from '../types/trace';
|
|
2
|
-
export declare class IncomingInlineQuery {
|
|
3
|
-
readonly queryId: string;
|
|
4
|
-
readonly query: string;
|
|
5
|
-
readonly userId: number;
|
|
6
|
-
readonly traceId: TraceId;
|
|
7
|
-
readonly abortController: AbortController;
|
|
8
|
-
constructor(queryId: string, query: string, userId: number, traceId: TraceId);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=incomingQuery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"incomingQuery.d.ts","sourceRoot":"","sources":["../../dtos/incomingQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,qBAAa,mBAAmB;IAIxB,QAAQ,CAAC,OAAO,EAAE,MAAM;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO;IAN7B,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;gBAG7B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO;CAIhC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IncomingInlineQuery = void 0;
|
|
4
|
-
class IncomingInlineQuery {
|
|
5
|
-
queryId;
|
|
6
|
-
query;
|
|
7
|
-
userId;
|
|
8
|
-
traceId;
|
|
9
|
-
abortController;
|
|
10
|
-
constructor(queryId, query, userId, traceId) {
|
|
11
|
-
this.queryId = queryId;
|
|
12
|
-
this.query = query;
|
|
13
|
-
this.userId = userId;
|
|
14
|
-
this.traceId = traceId;
|
|
15
|
-
this.abortController = new AbortController();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.IncomingInlineQuery = IncomingInlineQuery;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TelegramMessage } from '../types/externalAliases';
|
|
2
|
-
import { MessageTypeValue } from '../types/messageTypes';
|
|
3
|
-
export declare class MessageInfo {
|
|
4
|
-
/** Id of a message that triggered this action. */
|
|
5
|
-
readonly id: number;
|
|
6
|
-
/** Text of a message that triggered this action. */
|
|
7
|
-
readonly text: string;
|
|
8
|
-
/** Type of message being received */
|
|
9
|
-
readonly type: MessageTypeValue;
|
|
10
|
-
/** Message object recieved from Telegram */
|
|
11
|
-
readonly telegramUpdateObject: TelegramMessage;
|
|
12
|
-
constructor(
|
|
13
|
-
/** Id of a message that triggered this action. */
|
|
14
|
-
id: number,
|
|
15
|
-
/** Text of a message that triggered this action. */
|
|
16
|
-
text: string,
|
|
17
|
-
/** Type of message being received */
|
|
18
|
-
type: MessageTypeValue,
|
|
19
|
-
/** Message object recieved from Telegram */
|
|
20
|
-
telegramUpdateObject: TelegramMessage);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=messageInfo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messageInfo.d.ts","sourceRoot":"","sources":["../../dtos/messageInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBAAa,WAAW;IAEhB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,gBAAgB;IAC/B,4CAA4C;IAC5C,QAAQ,CAAC,oBAAoB,EAAE,eAAe;;IAP9C,kDAAkD;IACzC,EAAE,EAAE,MAAM;IACnB,oDAAoD;IAC3C,IAAI,EAAE,MAAM;IACrB,qCAAqC;IAC5B,IAAI,EAAE,gBAAgB;IAC/B,4CAA4C;IACnC,oBAAoB,EAAE,eAAe;CAErD"}
|
package/dist/dtos/messageInfo.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageInfo = void 0;
|
|
4
|
-
class MessageInfo {
|
|
5
|
-
id;
|
|
6
|
-
text;
|
|
7
|
-
type;
|
|
8
|
-
telegramUpdateObject;
|
|
9
|
-
constructor(
|
|
10
|
-
/** Id of a message that triggered this action. */
|
|
11
|
-
id,
|
|
12
|
-
/** Text of a message that triggered this action. */
|
|
13
|
-
text,
|
|
14
|
-
/** Type of message being received */
|
|
15
|
-
type,
|
|
16
|
-
/** Message object recieved from Telegram */
|
|
17
|
-
telegramUpdateObject) {
|
|
18
|
-
this.id = id;
|
|
19
|
-
this.text = text;
|
|
20
|
-
this.type = type;
|
|
21
|
-
this.telegramUpdateObject = telegramUpdateObject;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.MessageInfo = MessageInfo;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CooldownInfo } from './cooldownInfo';
|
|
2
|
-
import { CommandActionPropertyProvider, ScheduledActionPropertyProvider } from '../types/propertyProvider';
|
|
3
|
-
import { HoursOfDay } from '../types/timeValues';
|
|
4
|
-
export type CommandActionProviders = {
|
|
5
|
-
cooldownProvider: CommandActionPropertyProvider<CooldownInfo>;
|
|
6
|
-
isActiveProvider: CommandActionPropertyProvider<boolean>;
|
|
7
|
-
chatsBlacklistProvider: CommandActionPropertyProvider<number[]>;
|
|
8
|
-
chatsWhitelistProvider: CommandActionPropertyProvider<number[]>;
|
|
9
|
-
usersWhitelistProvider: CommandActionPropertyProvider<number[]>;
|
|
10
|
-
};
|
|
11
|
-
export type ScheduledActionProviders = {
|
|
12
|
-
timeinHoursProvider: ScheduledActionPropertyProvider<HoursOfDay>;
|
|
13
|
-
isActiveProvider: ScheduledActionPropertyProvider<boolean>;
|
|
14
|
-
chatsWhitelistProvider: ScheduledActionPropertyProvider<number[]>;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=propertyProviderSets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propertyProviderSets.d.ts","sourceRoot":"","sources":["../../dtos/propertyProviderSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACH,6BAA6B,EAC7B,+BAA+B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG;IACjC,gBAAgB,EAAE,6BAA6B,CAAC,YAAY,CAAC,CAAC;IAC9D,gBAAgB,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACzD,sBAAsB,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,sBAAsB,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,sBAAsB,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACnC,mBAAmB,EAAE,+BAA+B,CAAC,UAAU,CAAC,CAAC;IACjE,gBAAgB,EAAE,+BAA+B,CAAC,OAAO,CAAC,CAAC;IAC3D,sBAAsB,EAAE,+BAA+B,CAAC,MAAM,EAAE,CAAC,CAAC;CACrE,CAAC"}
|
package/dist/dtos/replyInfo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replyInfo.d.ts","sourceRoot":"","sources":["../../dtos/replyInfo.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IAClB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEvB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;CAIzC"}
|
package/dist/dtos/replyInfo.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IActionState } from '../../types/actionState';
|
|
2
|
-
import { IActionWithState } from '../../types/action';
|
|
3
|
-
import { IChatResponse } from '../../types/response';
|
|
4
|
-
import { Milliseconds } from '../../types/timeValues';
|
|
5
|
-
import { TraceId } from '../../types/trace';
|
|
6
|
-
import { ChatInfo } from '../chatInfo';
|
|
7
|
-
export declare class DelayResponse implements IChatResponse {
|
|
8
|
-
readonly kind: "delay";
|
|
9
|
-
readonly createdAt: number;
|
|
10
|
-
readonly chatInfo: ChatInfo;
|
|
11
|
-
readonly traceId: TraceId;
|
|
12
|
-
readonly delay: Milliseconds;
|
|
13
|
-
readonly action: IActionWithState<IActionState>;
|
|
14
|
-
constructor(delay: Milliseconds, chatInfo: ChatInfo, traceId: TraceId, action: IActionWithState<IActionState>);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=delay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../dtos/responses/delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAoB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,aAAc,YAAW,aAAa;IAC/C,QAAQ,CAAC,IAAI,UAA0B;IACvC,QAAQ,CAAC,SAAS,SAAc;IAEhC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;gBAG5C,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,gBAAgB,CAAC,YAAY,CAAC;CAO7C"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DelayResponse = void 0;
|
|
4
|
-
const response_1 = require("../../types/response");
|
|
5
|
-
class DelayResponse {
|
|
6
|
-
kind = response_1.BotResponseTypes.delay;
|
|
7
|
-
createdAt = Date.now();
|
|
8
|
-
chatInfo;
|
|
9
|
-
traceId;
|
|
10
|
-
delay;
|
|
11
|
-
action;
|
|
12
|
-
constructor(delay, chatInfo, traceId, action) {
|
|
13
|
-
this.chatInfo = chatInfo;
|
|
14
|
-
this.delay = delay;
|
|
15
|
-
this.traceId = traceId;
|
|
16
|
-
this.action = action;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.DelayResponse = DelayResponse;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IReplyResponseWithContent } from '../../types/response';
|
|
2
|
-
import { MessageSendingOptions } from '../../types/messageSendingOptions';
|
|
3
|
-
import { IAction } from '../../types/action';
|
|
4
|
-
import { ChatInfo } from '../chatInfo';
|
|
5
|
-
import { TraceId } from '../../types/trace';
|
|
6
|
-
import { ReplyInfo } from '../replyInfo';
|
|
7
|
-
import { IReplyCapture } from '../../types/capture';
|
|
8
|
-
import { InputFile } from '../../types/inputFile';
|
|
9
|
-
export declare class ImageMessage implements IReplyResponseWithContent<InputFile> {
|
|
10
|
-
readonly kind: "image";
|
|
11
|
-
readonly createdAt: number;
|
|
12
|
-
readonly captures: IReplyCapture[];
|
|
13
|
-
readonly content: InputFile;
|
|
14
|
-
readonly chatInfo: ChatInfo;
|
|
15
|
-
readonly replyInfo: ReplyInfo | undefined;
|
|
16
|
-
readonly traceId: TraceId;
|
|
17
|
-
readonly disableWebPreview = false;
|
|
18
|
-
readonly shouldPin: boolean;
|
|
19
|
-
readonly action: IAction;
|
|
20
|
-
constructor(image: InputFile, chatInfo: ChatInfo, traceId: TraceId, action: IAction, replyInfo: ReplyInfo | undefined, options?: MessageSendingOptions);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=imageMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imageMessage.d.ts","sourceRoot":"","sources":["../../../dtos/responses/imageMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,yBAAyB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,YAAa,YAAW,yBAAyB,CAAC,SAAS,CAAC;IACrE,QAAQ,CAAC,IAAI,UAA0B;IACvC,QAAQ,CAAC,SAAS,SAAc;IAChC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAM;IAExC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,SAAS;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAGrB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,SAAS,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,qBAAqB;CAStC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageMessage = void 0;
|
|
4
|
-
const response_1 = require("../../types/response");
|
|
5
|
-
class ImageMessage {
|
|
6
|
-
kind = response_1.BotResponseTypes.image;
|
|
7
|
-
createdAt = Date.now();
|
|
8
|
-
captures = [];
|
|
9
|
-
content;
|
|
10
|
-
chatInfo;
|
|
11
|
-
replyInfo;
|
|
12
|
-
traceId;
|
|
13
|
-
disableWebPreview = false;
|
|
14
|
-
shouldPin;
|
|
15
|
-
action;
|
|
16
|
-
constructor(image, chatInfo, traceId, action, replyInfo, options) {
|
|
17
|
-
this.content = image;
|
|
18
|
-
this.chatInfo = chatInfo;
|
|
19
|
-
this.replyInfo = replyInfo;
|
|
20
|
-
this.traceId = traceId;
|
|
21
|
-
this.shouldPin = options?.pin ?? false;
|
|
22
|
-
this.action = action;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ImageMessage = ImageMessage;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { InlineQueryAction } from '../../entities/actions/inlineQueryAction';
|
|
2
|
-
import { TelegramInlineQueryResult } from '../../types/externalAliases';
|
|
3
|
-
import { TraceId } from '../../types/trace';
|
|
4
|
-
export declare class InlineQueryResponse {
|
|
5
|
-
readonly kind: "inlineQuery";
|
|
6
|
-
readonly createdAt: number;
|
|
7
|
-
readonly queryId: string;
|
|
8
|
-
readonly traceId: TraceId;
|
|
9
|
-
readonly action: InlineQueryAction;
|
|
10
|
-
readonly queryResults: TelegramInlineQueryResult[];
|
|
11
|
-
constructor(queryResult: TelegramInlineQueryResult[], queryId: string, traceId: TraceId, action: InlineQueryAction);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=inlineQueryResponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inlineQueryResponse.d.ts","sourceRoot":"","sources":["../../../dtos/responses/inlineQueryResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,mBAAmB;IAC5B,QAAQ,CAAC,IAAI,gBAAgC;IAC7C,QAAQ,CAAC,SAAS,SAAc;IAEhC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,yBAAyB,EAAE,CAAC;gBAG/C,WAAW,EAAE,yBAAyB,EAAE,EACxC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,iBAAiB;CAOhC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InlineQueryResponse = void 0;
|
|
4
|
-
const response_1 = require("../../types/response");
|
|
5
|
-
class InlineQueryResponse {
|
|
6
|
-
kind = response_1.BotResponseTypes.inlineQuery;
|
|
7
|
-
createdAt = Date.now();
|
|
8
|
-
queryId;
|
|
9
|
-
traceId;
|
|
10
|
-
action;
|
|
11
|
-
queryResults;
|
|
12
|
-
constructor(queryResult, queryId, traceId, action) {
|
|
13
|
-
this.queryResults = queryResult;
|
|
14
|
-
this.queryId = queryId;
|
|
15
|
-
this.traceId = traceId;
|
|
16
|
-
this.action = action;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.InlineQueryResponse = InlineQueryResponse;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IChatResponse } from '../../types/response';
|
|
2
|
-
import { IAction } from '../../types/action';
|
|
3
|
-
import { ChatInfo } from '../chatInfo';
|
|
4
|
-
import { TraceId } from '../../types/trace';
|
|
5
|
-
import { TelegramEmoji } from '../../types/externalAliases';
|
|
6
|
-
export declare class Reaction implements IChatResponse {
|
|
7
|
-
readonly kind: "react";
|
|
8
|
-
readonly createdAt: number;
|
|
9
|
-
readonly chatInfo: ChatInfo;
|
|
10
|
-
readonly messageId: number;
|
|
11
|
-
readonly traceId: TraceId;
|
|
12
|
-
readonly emoji: TelegramEmoji;
|
|
13
|
-
readonly action: IAction;
|
|
14
|
-
constructor(traceId: TraceId, chatInfo: ChatInfo, messageId: number, emoji: TelegramEmoji, action: IAction);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=reaction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../../../dtos/responses/reaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,QAAS,YAAW,aAAa;IAC1C,QAAQ,CAAC,IAAI,UAA0B;IACvC,QAAQ,CAAC,SAAS,SAAc;IAEhC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAGrB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,OAAO;CAQtB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Reaction = void 0;
|
|
4
|
-
const response_1 = require("../../types/response");
|
|
5
|
-
class Reaction {
|
|
6
|
-
kind = response_1.BotResponseTypes.react;
|
|
7
|
-
createdAt = Date.now();
|
|
8
|
-
chatInfo;
|
|
9
|
-
messageId;
|
|
10
|
-
traceId;
|
|
11
|
-
emoji;
|
|
12
|
-
action;
|
|
13
|
-
constructor(traceId, chatInfo, messageId, emoji, action) {
|
|
14
|
-
this.chatInfo = chatInfo;
|
|
15
|
-
this.messageId = messageId;
|
|
16
|
-
this.emoji = emoji;
|
|
17
|
-
this.traceId = traceId;
|
|
18
|
-
this.action = action;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.Reaction = Reaction;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { TextMessageSendingOptions } from '../../types/messageSendingOptions';
|
|
2
|
-
import { IReplyResponseWithContent } from '../../types/response';
|
|
3
|
-
import { IAction } from '../../types/action';
|
|
4
|
-
import { ChatInfo } from '../chatInfo';
|
|
5
|
-
import { TraceId } from '../../types/trace';
|
|
6
|
-
import { ReplyInfo } from '../replyInfo';
|
|
7
|
-
import { IReplyCapture } from '../../types/capture';
|
|
8
|
-
import { TelegramInlineKeyboardButton } from '../../types/externalAliases';
|
|
9
|
-
export declare class TextMessage implements IReplyResponseWithContent<string> {
|
|
10
|
-
readonly kind: "text";
|
|
11
|
-
readonly createdAt: number;
|
|
12
|
-
readonly captures: IReplyCapture[];
|
|
13
|
-
readonly content: string;
|
|
14
|
-
readonly chatInfo: ChatInfo;
|
|
15
|
-
readonly replyInfo: ReplyInfo | undefined;
|
|
16
|
-
readonly traceId: TraceId;
|
|
17
|
-
readonly disableWebPreview: boolean;
|
|
18
|
-
readonly shouldPin: boolean;
|
|
19
|
-
readonly action: IAction;
|
|
20
|
-
readonly keyboard?: TelegramInlineKeyboardButton[][];
|
|
21
|
-
constructor(text: string, chatInfo: ChatInfo, traceId: TraceId, action: IAction, replyInfo?: ReplyInfo, options?: TextMessageSendingOptions);
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=textMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textMessage.d.ts","sourceRoot":"","sources":["../../../dtos/responses/textMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAEH,yBAAyB,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAE3E,qBAAa,WAAY,YAAW,yBAAyB,CAAC,MAAM,CAAC;IACjE,QAAQ,CAAC,IAAI,SAAyB;IACtC,QAAQ,CAAC,SAAS,SAAc;IAChC,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAM;IAExC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,4BAA4B,EAAE,EAAE,CAAC;gBAGjD,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,SAAS,CAAC,EAAE,SAAS,EACrB,OAAO,CAAC,EAAE,yBAAyB;CAW1C"}
|