chz-telegram-bot 0.5.4 → 0.6.8

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.
Files changed (234) hide show
  1. package/README.md +41 -31
  2. package/dist/builtin/helpAction.d.ts +2 -0
  3. package/dist/builtin/helpAction.d.ts.map +1 -0
  4. package/dist/builtin/helpAction.js +14 -0
  5. package/dist/dtos/chatHistoryMessage.d.ts +35 -0
  6. package/dist/dtos/chatHistoryMessage.d.ts.map +1 -0
  7. package/dist/dtos/chatHistoryMessage.js +32 -0
  8. package/dist/dtos/chatInfo.d.ts +17 -0
  9. package/dist/dtos/chatInfo.d.ts.map +1 -0
  10. package/dist/dtos/chatInfo.js +16 -0
  11. package/dist/dtos/commandTriggerCheckResult.d.ts +24 -0
  12. package/dist/dtos/commandTriggerCheckResult.d.ts.map +1 -0
  13. package/dist/dtos/commandTriggerCheckResult.js +34 -0
  14. package/dist/dtos/cooldownInfo.d.ts +13 -0
  15. package/dist/dtos/cooldownInfo.d.ts.map +1 -0
  16. package/dist/dtos/cooldownInfo.js +12 -0
  17. package/dist/dtos/incomingMessage.d.ts +19 -0
  18. package/dist/dtos/incomingMessage.d.ts.map +1 -0
  19. package/dist/dtos/incomingMessage.js +63 -0
  20. package/dist/dtos/incomingQuery.d.ts +10 -0
  21. package/dist/dtos/incomingQuery.d.ts.map +1 -0
  22. package/dist/dtos/incomingQuery.js +14 -0
  23. package/dist/dtos/messageInfo.d.ts +22 -0
  24. package/dist/dtos/messageInfo.d.ts.map +1 -0
  25. package/dist/dtos/messageInfo.js +20 -0
  26. package/dist/dtos/propertyProviderSets.d.ts +16 -0
  27. package/dist/dtos/propertyProviderSets.d.ts.map +1 -0
  28. package/dist/dtos/propertyProviderSets.js +1 -0
  29. package/dist/dtos/replyInfo.d.ts +6 -0
  30. package/dist/dtos/replyInfo.d.ts.map +1 -0
  31. package/dist/dtos/replyInfo.js +8 -0
  32. package/dist/dtos/responses/delay.d.ts +16 -0
  33. package/dist/dtos/responses/delay.d.ts.map +1 -0
  34. package/dist/dtos/responses/delay.js +15 -0
  35. package/dist/dtos/responses/imageMessage.d.ts +22 -0
  36. package/dist/dtos/responses/imageMessage.d.ts.map +1 -0
  37. package/dist/dtos/responses/imageMessage.js +21 -0
  38. package/dist/dtos/responses/inlineQueryResponse.d.ts +13 -0
  39. package/dist/dtos/responses/inlineQueryResponse.d.ts.map +1 -0
  40. package/dist/dtos/responses/inlineQueryResponse.js +15 -0
  41. package/dist/dtos/responses/reaction.d.ts +16 -0
  42. package/dist/dtos/responses/reaction.d.ts.map +1 -0
  43. package/dist/dtos/responses/reaction.js +17 -0
  44. package/dist/dtos/responses/textMessage.d.ts +23 -0
  45. package/dist/dtos/responses/textMessage.d.ts.map +1 -0
  46. package/dist/dtos/responses/textMessage.js +24 -0
  47. package/dist/dtos/responses/unpin.d.ts +15 -0
  48. package/dist/dtos/responses/unpin.d.ts.map +1 -0
  49. package/dist/dtos/responses/unpin.js +15 -0
  50. package/dist/dtos/responses/videoMessage.d.ts +22 -0
  51. package/dist/dtos/responses/videoMessage.d.ts.map +1 -0
  52. package/dist/dtos/responses/videoMessage.js +21 -0
  53. package/dist/dtos/userInfo.d.ts +12 -0
  54. package/dist/dtos/userInfo.d.ts.map +1 -0
  55. package/dist/dtos/userInfo.js +12 -0
  56. package/dist/entities/actions/commandAction.d.ts +31 -0
  57. package/dist/entities/actions/commandAction.d.ts.map +1 -0
  58. package/dist/entities/actions/commandAction.js +149 -0
  59. package/dist/entities/actions/inlineQueryAction.d.ts +14 -0
  60. package/dist/entities/actions/inlineQueryAction.d.ts.map +1 -0
  61. package/dist/entities/actions/inlineQueryAction.js +51 -0
  62. package/dist/entities/actions/replyCaptureAction.d.ts +15 -0
  63. package/dist/entities/actions/replyCaptureAction.d.ts.map +1 -0
  64. package/dist/entities/actions/replyCaptureAction.js +66 -0
  65. package/dist/entities/actions/scheduledAction.d.ts +24 -0
  66. package/dist/entities/actions/scheduledAction.d.ts.map +1 -0
  67. package/dist/entities/actions/scheduledAction.js +92 -0
  68. package/dist/entities/botInstance.d.ts +36 -0
  69. package/dist/entities/botInstance.d.ts.map +1 -0
  70. package/dist/entities/botInstance.js +39 -0
  71. package/dist/entities/cachedStateFactory.d.ts +7 -0
  72. package/dist/entities/cachedStateFactory.d.ts.map +1 -0
  73. package/dist/entities/cachedStateFactory.js +8 -0
  74. package/dist/entities/context/baseContext.d.ts +39 -0
  75. package/dist/entities/context/baseContext.d.ts.map +1 -0
  76. package/dist/entities/context/baseContext.js +56 -0
  77. package/dist/entities/context/chatContext.d.ts +50 -0
  78. package/dist/entities/context/chatContext.d.ts.map +1 -0
  79. package/dist/entities/context/chatContext.js +65 -0
  80. package/dist/entities/context/inlineQueryContext.d.ts +27 -0
  81. package/dist/entities/context/inlineQueryContext.d.ts.map +1 -0
  82. package/dist/entities/context/inlineQueryContext.js +29 -0
  83. package/dist/entities/context/messageContext.d.ts +92 -0
  84. package/dist/entities/context/messageContext.d.ts.map +1 -0
  85. package/dist/entities/context/messageContext.js +116 -0
  86. package/dist/entities/context/replyContext.d.ts +89 -0
  87. package/dist/entities/context/replyContext.d.ts.map +1 -0
  88. package/dist/entities/context/replyContext.js +124 -0
  89. package/dist/entities/states/actionStateBase.d.ts +6 -0
  90. package/dist/entities/states/actionStateBase.d.ts.map +1 -0
  91. package/dist/entities/states/actionStateBase.js +4 -0
  92. package/dist/entities/taskRecord.d.ts +8 -0
  93. package/dist/entities/taskRecord.d.ts.map +1 -0
  94. package/dist/entities/taskRecord.js +10 -0
  95. package/dist/eslint.config.d.ts +3 -0
  96. package/dist/eslint.config.d.ts.map +1 -0
  97. package/dist/eslint.config.js +51 -0
  98. package/dist/helpers/builders/commandActionBuilder.d.ts +100 -0
  99. package/dist/helpers/builders/commandActionBuilder.d.ts.map +1 -0
  100. package/dist/helpers/builders/commandActionBuilder.js +146 -0
  101. package/dist/helpers/builders/inlineQueryActionBuilder.d.ts +37 -0
  102. package/dist/helpers/builders/inlineQueryActionBuilder.d.ts.map +1 -0
  103. package/dist/helpers/builders/inlineQueryActionBuilder.js +50 -0
  104. package/dist/helpers/builders/scheduledActionBuilder.d.ts +68 -0
  105. package/dist/helpers/builders/scheduledActionBuilder.d.ts.map +1 -0
  106. package/dist/helpers/builders/scheduledActionBuilder.js +95 -0
  107. package/dist/helpers/mapUtils.d.ts +10 -0
  108. package/dist/helpers/mapUtils.d.ts.map +1 -0
  109. package/dist/helpers/mapUtils.js +13 -0
  110. package/dist/helpers/noop.d.ts +9 -0
  111. package/dist/helpers/noop.d.ts.map +1 -0
  112. package/dist/helpers/noop.js +17 -0
  113. package/dist/helpers/objectFromEntries.d.ts +2 -0
  114. package/dist/helpers/objectFromEntries.d.ts.map +1 -0
  115. package/dist/helpers/objectFromEntries.js +3 -0
  116. package/dist/helpers/timeConvertions.d.ts +5 -0
  117. package/dist/helpers/timeConvertions.d.ts.map +1 -0
  118. package/dist/helpers/timeConvertions.js +9 -0
  119. package/dist/helpers/toArray.d.ts +2 -0
  120. package/dist/helpers/toArray.d.ts.map +1 -0
  121. package/dist/helpers/toArray.js +3 -0
  122. package/dist/helpers/traceFactory.d.ts +3 -0
  123. package/dist/helpers/traceFactory.d.ts.map +1 -0
  124. package/dist/helpers/traceFactory.js +3 -0
  125. package/dist/index.d.ts +27 -0
  126. package/dist/index.d.ts.map +1 -0
  127. package/dist/index.js +20 -0
  128. package/dist/main.d.ts +49 -0
  129. package/dist/main.d.ts.map +1 -0
  130. package/dist/main.js +33 -0
  131. package/dist/services/actionProcessingService.d.ts +25 -0
  132. package/dist/services/actionProcessingService.d.ts.map +1 -0
  133. package/dist/services/actionProcessingService.js +50 -0
  134. package/dist/services/actionProcessors/baseProcessor.d.ts +18 -0
  135. package/dist/services/actionProcessors/baseProcessor.d.ts.map +1 -0
  136. package/dist/services/actionProcessors/baseProcessor.js +33 -0
  137. package/dist/services/actionProcessors/commandActionProcessor.d.ts +19 -0
  138. package/dist/services/actionProcessors/commandActionProcessor.d.ts.map +1 -0
  139. package/dist/services/actionProcessors/commandActionProcessor.js +130 -0
  140. package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts +11 -0
  141. package/dist/services/actionProcessors/inlineQueryActionProcessor.d.ts.map +1 -0
  142. package/dist/services/actionProcessors/inlineQueryActionProcessor.js +69 -0
  143. package/dist/services/actionProcessors/scheduledActionProcessor.d.ts +17 -0
  144. package/dist/services/actionProcessors/scheduledActionProcessor.d.ts.map +1 -0
  145. package/dist/services/actionProcessors/scheduledActionProcessor.js +55 -0
  146. package/dist/services/jsonFileStorage.d.ts +25 -0
  147. package/dist/services/jsonFileStorage.d.ts.map +1 -0
  148. package/dist/services/jsonFileStorage.js +133 -0
  149. package/dist/services/nodeTimeoutScheduler.d.ts +13 -0
  150. package/dist/services/nodeTimeoutScheduler.d.ts.map +1 -0
  151. package/dist/services/nodeTimeoutScheduler.js +50 -0
  152. package/dist/services/responseProcessingQueue.d.ts +12 -0
  153. package/dist/services/responseProcessingQueue.d.ts.map +1 -0
  154. package/dist/services/responseProcessingQueue.js +37 -0
  155. package/dist/services/telegramApi.d.ts +23 -0
  156. package/dist/services/telegramApi.d.ts.map +1 -0
  157. package/dist/services/telegramApi.js +163 -0
  158. package/dist/types/action.d.ts +14 -0
  159. package/dist/types/action.d.ts.map +1 -0
  160. package/dist/types/action.js +1 -0
  161. package/dist/types/actionState.d.ts +5 -0
  162. package/dist/types/actionState.d.ts.map +1 -0
  163. package/dist/types/actionState.js +1 -0
  164. package/dist/types/cachedValueAccessor.d.ts +2 -0
  165. package/dist/types/cachedValueAccessor.d.ts.map +1 -0
  166. package/dist/types/cachedValueAccessor.js +1 -0
  167. package/dist/types/capture.d.ts +24 -0
  168. package/dist/types/capture.d.ts.map +1 -0
  169. package/dist/types/capture.js +1 -0
  170. package/dist/types/commandCondition.d.ts +8 -0
  171. package/dist/types/commandCondition.d.ts.map +1 -0
  172. package/dist/types/commandCondition.js +1 -0
  173. package/dist/types/commandTrigger.d.ts +2 -0
  174. package/dist/types/commandTrigger.d.ts.map +1 -0
  175. package/dist/types/commandTrigger.js +1 -0
  176. package/dist/types/events.d.ts +193 -0
  177. package/dist/types/events.d.ts.map +1 -0
  178. package/dist/types/events.js +69 -0
  179. package/dist/types/externalAliases.d.ts +11 -0
  180. package/dist/types/externalAliases.d.ts.map +1 -0
  181. package/dist/types/externalAliases.js +1 -0
  182. package/dist/types/handlers.d.ts +21 -0
  183. package/dist/types/handlers.d.ts.map +1 -0
  184. package/dist/types/handlers.js +1 -0
  185. package/dist/types/inputFile.d.ts +5 -0
  186. package/dist/types/inputFile.d.ts.map +1 -0
  187. package/dist/types/inputFile.js +1 -0
  188. package/dist/types/logger.d.ts +1 -0
  189. package/dist/types/logger.d.ts.map +1 -0
  190. package/dist/types/logger.js +1 -0
  191. package/dist/types/messageSendingOptions.d.ts +9 -0
  192. package/dist/types/messageSendingOptions.d.ts.map +1 -0
  193. package/dist/types/messageSendingOptions.js +1 -0
  194. package/dist/types/messageTypes.d.ts +20 -0
  195. package/dist/types/messageTypes.d.ts.map +1 -0
  196. package/dist/types/messageTypes.js +18 -0
  197. package/dist/types/propertyProvider.d.ts +8 -0
  198. package/dist/types/propertyProvider.d.ts.map +1 -0
  199. package/dist/types/propertyProvider.js +1 -0
  200. package/dist/types/response.d.ts +39 -0
  201. package/dist/types/response.d.ts.map +1 -0
  202. package/dist/types/response.js +9 -0
  203. package/dist/types/scheduler.d.ts +7 -0
  204. package/dist/types/scheduler.d.ts.map +1 -0
  205. package/dist/types/scheduler.js +1 -0
  206. package/dist/types/storage.d.ts +11 -0
  207. package/dist/types/storage.d.ts.map +1 -0
  208. package/dist/types/storage.js +1 -0
  209. package/dist/types/timeValues.d.ts +15 -0
  210. package/dist/types/timeValues.d.ts.map +1 -0
  211. package/dist/types/timeValues.js +1 -0
  212. package/dist/types/trace.d.ts +6 -0
  213. package/dist/types/trace.d.ts.map +1 -0
  214. package/dist/types/trace.js +1 -0
  215. package/entities/actions/commandAction.ts +11 -3
  216. package/entities/actions/inlineQueryAction.ts +9 -1
  217. package/entities/actions/replyCaptureAction.ts +9 -3
  218. package/entities/actions/scheduledAction.ts +31 -10
  219. package/entities/botInstance.ts +18 -25
  220. package/entities/context/baseContext.ts +9 -4
  221. package/index.ts +1 -1
  222. package/main.ts +1 -10
  223. package/package.json +38 -38
  224. package/services/actionProcessingService.ts +11 -15
  225. package/services/actionProcessors/baseProcessor.ts +9 -9
  226. package/services/actionProcessors/commandActionProcessor.ts +35 -46
  227. package/services/actionProcessors/inlineQueryActionProcessor.ts +24 -20
  228. package/services/actionProcessors/scheduledActionProcessor.ts +5 -10
  229. package/services/jsonFileStorage.ts +27 -1
  230. package/services/nodeTimeoutScheduler.ts +22 -22
  231. package/services/telegramApi.ts +53 -23
  232. package/types/events.ts +285 -0
  233. package/services/jsonLogger.ts +0 -112
  234. package/types/logger.ts +0 -39
@@ -0,0 +1,116 @@
1
+ import { resolve } from 'path';
2
+ import { ImageMessage } from '../../dtos/responses/imageMessage';
3
+ import { Reaction } from '../../dtos/responses/reaction';
4
+ import { TextMessage } from '../../dtos/responses/textMessage';
5
+ import { VideoMessage } from '../../dtos/responses/videoMessage';
6
+ import { ChatContextInternal } from './chatContext';
7
+ import { ReplyInfo } from '../../dtos/replyInfo';
8
+ /**
9
+ * Context of action executed in chat, in response to a message
10
+ */
11
+ export class MessageContextInternal extends ChatContextInternal {
12
+ /** Information about the user that triggered this action */
13
+ userInfo;
14
+ /** Information about the message that triggered this action */
15
+ messageInfo;
16
+ /** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
17
+ matchResults = [];
18
+ /** Indicates if cooldown should be started after action is executed. Set to `true` by default. */
19
+ startCooldown = true;
20
+ /** Bot info from Telegram */
21
+ botInfo;
22
+ customCooldown;
23
+ getQuotePart(quote) {
24
+ if (typeof quote != 'boolean')
25
+ return quote;
26
+ return this.matchResults.length == 0
27
+ ? this.messageInfo.text
28
+ : this.matchResults[0][1];
29
+ }
30
+ replyWithText(text, quote, options) {
31
+ const quotedPart = this.getQuotePart(quote);
32
+ const response = new TextMessage(text, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
33
+ this.responses.push(response);
34
+ return this.createCaptureController(response);
35
+ }
36
+ replyWithImage(name, quote, options) {
37
+ const quotedPart = this.getQuotePart(quote);
38
+ const response = new ImageMessage({ source: resolve(`./content/${name}.png`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
39
+ this.responses.push(response);
40
+ return this.createCaptureController(response);
41
+ }
42
+ replyWithVideo(name, quote, options) {
43
+ const quotedPart = this.getQuotePart(quote);
44
+ const response = new VideoMessage({ source: resolve(`./content/${name}.mp4`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
45
+ this.responses.push(response);
46
+ return this.createCaptureController(response);
47
+ }
48
+ skipCooldown() {
49
+ this.startCooldown = false;
50
+ }
51
+ startCustomCooldown(customCooldown) {
52
+ this.startCooldown = true;
53
+ this.customCooldown = customCooldown;
54
+ }
55
+ /**
56
+ * Collection of actions that can be done as a reply to a message that triggered this action
57
+ */
58
+ reply = {
59
+ /**
60
+ * Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
61
+ * If regex is matched, first match will be quoted
62
+ */
63
+ andQuote: {
64
+ /**
65
+ * Reply with text message to message that triggered this action after action execution is finished.
66
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
67
+ * @param text Message contents.
68
+ * @param options Message sending option.
69
+ */
70
+ withText: (text, quote, options) => this.replyWithText(text, quote ?? true, options),
71
+ /**
72
+ * Reply with image message to message that triggered this action after action execution is finished.
73
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
74
+ * @param text Message contents.
75
+ * @param options Message sending option.
76
+ */
77
+ withImage: (name, quote, options) => this.replyWithImage(name, quote ?? true, options),
78
+ /**
79
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
80
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
81
+ * @param text Message contents.
82
+ * @param options Message sending option.
83
+ */
84
+ withVideo: (name, quote, options) => this.replyWithVideo(name, quote ?? true, options)
85
+ },
86
+ /**
87
+ * Reply with text message to message that triggered this action after action execution is finished.
88
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
89
+ * @param text Message contents.
90
+ * @param options Message sending option.
91
+ */
92
+ withText: (text, options) => this.replyWithText(text, false, options),
93
+ /**
94
+ * Reply with image message to message that triggered this action after action execution is finished.
95
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
96
+ * @param text Message contents.
97
+ * @param options Message sending option.
98
+ */
99
+ withImage: (name, options) => this.replyWithImage(name, false, options),
100
+ /**
101
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
102
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
103
+ * @param text Message contents.
104
+ * @param options Message sending option.
105
+ */
106
+ withVideo: (name, options) => this.replyWithVideo(name, false, options),
107
+ /**
108
+ * React to the message that triggered this action after action execution is finished.
109
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
110
+ * @param emoji Telegram emoji to react with.
111
+ */
112
+ withReaction: (emoji) => {
113
+ this.responses.push(new Reaction(this.traceId, this.chatInfo, this.messageInfo.id, emoji, this.action));
114
+ }
115
+ };
116
+ }
@@ -0,0 +1,89 @@
1
+ import { IActionState } from '../../types/actionState';
2
+ import { TextMessageSendingOptions, MessageSendingOptions } from '../../types/messageSendingOptions';
3
+ import { ReplyCaptureAction } from '../actions/replyCaptureAction';
4
+ import { BaseContextInternal, BaseContextPropertiesToOmit } from './baseContext';
5
+ import { UserInfo } from '../../dtos/userInfo';
6
+ import { MessageInfo } from '../../dtos/messageInfo';
7
+ import { TelegramUser, TelegramEmoji } from '../../types/externalAliases';
8
+ export type ReplyContext<TActionState extends IActionState> = Omit<ReplyContextInternal<TActionState>, BaseContextPropertiesToOmit | 'messageId' | 'startCooldown' | 'customCooldown'>;
9
+ export declare class ReplyContextInternal<TParentActionState extends IActionState> extends BaseContextInternal<ReplyCaptureAction<TParentActionState>> {
10
+ /** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
11
+ matchResults: RegExpExecArray[];
12
+ /** Id of a message that triggered this action. */
13
+ replyMessageId: number | undefined;
14
+ /** Information about the user that triggered this action */
15
+ userInfo: UserInfo;
16
+ /** Information about the message that triggered this action */
17
+ messageInfo: MessageInfo;
18
+ /** Bot info from Telegram */
19
+ botInfo: TelegramUser;
20
+ isInitialized: boolean;
21
+ private getQuotePart;
22
+ private replyWithText;
23
+ private replyWithImage;
24
+ private replyWithVideo;
25
+ /**
26
+ * Stops capturing replies and removes this action
27
+ */
28
+ stopCapture(): void;
29
+ /**
30
+ * Collection of actions that can be done as a reply to a message that triggered this action
31
+ */
32
+ reply: {
33
+ /**
34
+ * Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
35
+ * If regex is matched, first match will be quoted
36
+ */
37
+ andQuote: {
38
+ /**
39
+ * Reply with text message to message that triggered this action after action execution is finished.
40
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
41
+ * @param text Message contents.
42
+ * @param options Message sending option.
43
+ */
44
+ withText: (text: string, quote?: string, options?: TextMessageSendingOptions) => import("../..").ICaptureController;
45
+ /**
46
+ * Reply with image message to message that triggered this action after action execution is finished.
47
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
48
+ * @param text Message contents.
49
+ * @param options Message sending option.
50
+ */
51
+ withImage: (name: string, quote?: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
52
+ /**
53
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
54
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
55
+ * @param text Message contents.
56
+ * @param options Message sending option.
57
+ */
58
+ withVideo: (name: string, quote?: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
59
+ };
60
+ /**
61
+ * Reply with text message to message that triggered this action after action execution is finished.
62
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
63
+ * @param text Message contents.
64
+ * @param options Message sending option.
65
+ */
66
+ withText: (text: string, options?: TextMessageSendingOptions) => import("../..").ICaptureController;
67
+ /**
68
+ * Reply with image message to message that triggered this action after action execution is finished.
69
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
70
+ * @param text Message contents.
71
+ * @param options Message sending option.
72
+ */
73
+ withImage: (name: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
74
+ /**
75
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
76
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
77
+ * @param text Message contents.
78
+ * @param options Message sending option.
79
+ */
80
+ withVideo: (name: string, options?: MessageSendingOptions) => import("../..").ICaptureController;
81
+ /**
82
+ * React to the message that triggered this action after action execution is finished.
83
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
84
+ * @param emoji Telegram emoji to react with.
85
+ */
86
+ withReaction: (emoji: TelegramEmoji) => void;
87
+ };
88
+ }
89
+ //# sourceMappingURL=replyContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replyContext.d.ts","sourceRoot":"","sources":["../../../entities/context/replyContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACH,yBAAyB,EACzB,qBAAqB,EACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EACH,mBAAmB,EACnB,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BACmB,aAAa;MAWrC;CACL"}
@@ -0,0 +1,124 @@
1
+ import { ReplyInfo } from '../../dtos/replyInfo';
2
+ import { ImageMessage } from '../../dtos/responses/imageMessage';
3
+ import { Reaction } from '../../dtos/responses/reaction';
4
+ import { TextMessage } from '../../dtos/responses/textMessage';
5
+ import { VideoMessage } from '../../dtos/responses/videoMessage';
6
+ import { resolve } from 'path';
7
+ import { BaseContextInternal } from './baseContext';
8
+ export class ReplyContextInternal extends BaseContextInternal {
9
+ /** Collection of Regexp match results on a message that triggered this action. Will be empty if trigger is not a Regexp. */
10
+ matchResults;
11
+ /** Id of a message that triggered this action. */
12
+ replyMessageId;
13
+ /** Information about the user that triggered this action */
14
+ userInfo;
15
+ /** Information about the message that triggered this action */
16
+ messageInfo;
17
+ /** Bot info from Telegram */
18
+ botInfo;
19
+ isInitialized = false;
20
+ getQuotePart(quote) {
21
+ if (typeof quote != 'boolean')
22
+ return quote;
23
+ return this.matchResults.length == 0
24
+ ? this.messageInfo.text
25
+ : this.matchResults[0][1];
26
+ }
27
+ replyWithText(text, quote, options) {
28
+ const quotedPart = this.getQuotePart(quote);
29
+ const response = new TextMessage(text, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
30
+ this.responses.push(response);
31
+ return this.createCaptureController(response);
32
+ }
33
+ replyWithImage(name, quote, options) {
34
+ const quotedPart = this.getQuotePart(quote);
35
+ const response = new ImageMessage({ source: resolve(`./content/${name}.png`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
36
+ this.responses.push(response);
37
+ return this.createCaptureController(response);
38
+ }
39
+ replyWithVideo(name, quote, options) {
40
+ const quotedPart = this.getQuotePart(quote);
41
+ const response = new VideoMessage({ source: resolve(`./content/${name}.mp4`) }, this.chatInfo, this.traceId, this.action, new ReplyInfo(this.messageInfo.id, quote ? quotedPart : undefined), options);
42
+ this.responses.push(response);
43
+ return this.createCaptureController(response);
44
+ }
45
+ /**
46
+ * Stops capturing replies and removes this action
47
+ */
48
+ stopCapture() {
49
+ this.action.abortController.abort();
50
+ }
51
+ /**
52
+ * Collection of actions that can be done as a reply to a message that triggered this action
53
+ */
54
+ reply = {
55
+ /**
56
+ * Collection of actions that can be done as a reply to a message, quoting the part that triggered this action
57
+ * If regex is matched, first match will be quoted
58
+ */
59
+ andQuote: {
60
+ /**
61
+ * Reply with text message to message that triggered this action after action execution is finished.
62
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
63
+ * @param text Message contents.
64
+ * @param options Message sending option.
65
+ */
66
+ withText: (text, quote, options) => {
67
+ return this.replyWithText(text, quote ?? true, options);
68
+ },
69
+ /**
70
+ * Reply with image message to message that triggered this action after action execution is finished.
71
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
72
+ * @param text Message contents.
73
+ * @param options Message sending option.
74
+ */
75
+ withImage: (name, quote, options) => {
76
+ return this.replyWithImage(name, quote ?? true, options);
77
+ },
78
+ /**
79
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
80
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
81
+ * @param text Message contents.
82
+ * @param options Message sending option.
83
+ */
84
+ withVideo: (name, quote, options) => {
85
+ return this.replyWithVideo(name, quote ?? true, options);
86
+ }
87
+ },
88
+ /**
89
+ * Reply with text message to message that triggered this action after action execution is finished.
90
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
91
+ * @param text Message contents.
92
+ * @param options Message sending option.
93
+ */
94
+ withText: (text, options) => {
95
+ return this.replyWithText(text, false, options);
96
+ },
97
+ /**
98
+ * Reply with image message to message that triggered this action after action execution is finished.
99
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
100
+ * @param text Message contents.
101
+ * @param options Message sending option.
102
+ */
103
+ withImage: (name, options) => {
104
+ return this.replyWithImage(name, false, options);
105
+ },
106
+ /**
107
+ * Reply with video/gif message to message that triggered this action after action execution is finished.
108
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
109
+ * @param text Message contents.
110
+ * @param options Message sending option.
111
+ */
112
+ withVideo: (name, options) => {
113
+ return this.replyWithVideo(name, false, options);
114
+ },
115
+ /**
116
+ * React to the message that triggered this action after action execution is finished.
117
+ * If multiple responses are sent, they will be sent in the order they were added, with delay of at least 35ms as per Telegram rate-limit.
118
+ * @param emoji Telegram emoji to react with.
119
+ */
120
+ withReaction: (emoji) => {
121
+ this.responses.push(new Reaction(this.traceId, this.chatInfo, this.messageInfo.id, emoji, this.action));
122
+ }
123
+ };
124
+ }
@@ -0,0 +1,6 @@
1
+ import { IActionState } from '../../types/actionState';
2
+ export declare class ActionStateBase implements IActionState {
3
+ pinnedMessages: number[];
4
+ lastExecutedDate: number;
5
+ }
6
+ //# sourceMappingURL=actionStateBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actionStateBase.d.ts","sourceRoot":"","sources":["../../../entities/states/actionStateBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,eAAgB,YAAW,YAAY;IAChD,cAAc,EAAE,MAAM,EAAE,CAAM;IAC9B,gBAAgB,SAAK;CACxB"}
@@ -0,0 +1,4 @@
1
+ export class ActionStateBase {
2
+ pinnedMessages = [];
3
+ lastExecutedDate = 0;
4
+ }
@@ -0,0 +1,8 @@
1
+ import { Milliseconds } from '../types/timeValues';
2
+ export declare class TaskRecord {
3
+ readonly name: string;
4
+ readonly taskId: NodeJS.Timeout;
5
+ readonly interval: Milliseconds;
6
+ constructor(name: string, taskId: NodeJS.Timeout, interval: Milliseconds);
7
+ }
8
+ //# sourceMappingURL=taskRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskRecord.d.ts","sourceRoot":"","sources":["../../entities/taskRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,qBAAa,UAAU;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;gBAEpB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY;CAK3E"}
@@ -0,0 +1,10 @@
1
+ export class TaskRecord {
2
+ name;
3
+ taskId;
4
+ interval;
5
+ constructor(name, taskId, interval) {
6
+ this.name = name;
7
+ this.taskId = taskId;
8
+ this.interval = interval;
9
+ }
10
+ }
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ export default _default;
3
+ //# sourceMappingURL=eslint.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.config.d.ts","sourceRoot":"","sources":["../eslint.config.ts"],"names":[],"mappings":";AAIA,wBAoDE"}
@@ -0,0 +1,51 @@
1
+ import eslint from '@eslint/js';
2
+ import tseslint from 'typescript-eslint';
3
+ import parser from '@typescript-eslint/parser';
4
+ export default tseslint.config({
5
+ ignores: ['dist/**']
6
+ }, eslint.configs.recommended, tseslint.configs.strictTypeChecked, {
7
+ languageOptions: {
8
+ parser,
9
+ parserOptions: {
10
+ project: './tsconfig.json',
11
+ tsconfigRootDir: __dirname,
12
+ sourceType: 'module',
13
+ projectService: true
14
+ }
15
+ },
16
+ plugins: { '@typescript-eslint': tseslint.plugin },
17
+ rules: {
18
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
19
+ '@typescript-eslint/no-unused-vars': [
20
+ 'error',
21
+ {
22
+ args: 'all',
23
+ argsIgnorePattern: '^_',
24
+ caughtErrors: 'all',
25
+ caughtErrorsIgnorePattern: '^_',
26
+ destructuredArrayIgnorePattern: '^_',
27
+ varsIgnorePattern: '^_',
28
+ ignoreRestSiblings: true
29
+ }
30
+ ],
31
+ '@typescript-eslint/no-misused-promises': [
32
+ 'error',
33
+ {
34
+ checksVoidReturn: true,
35
+ checksConditionals: true
36
+ }
37
+ ],
38
+ '@typescript-eslint/restrict-template-expressions': [
39
+ 'error',
40
+ {
41
+ allowNumber: true
42
+ }
43
+ ],
44
+ '@typescript-eslint/unbound-method': [
45
+ 'error',
46
+ {
47
+ ignoreStatic: true
48
+ }
49
+ ]
50
+ }
51
+ });
@@ -0,0 +1,100 @@
1
+ import { CommandHandler } from '../../types/handlers';
2
+ import { CommandCondition } from '../../types/commandCondition';
3
+ import { Seconds } from '../../types/timeValues';
4
+ import { CommandAction } from '../../entities/actions/commandAction';
5
+ import { ActionStateBase } from '../../entities/states/actionStateBase';
6
+ import { IActionState } from '../../types/actionState';
7
+ import { CommandTrigger } from '../../types/commandTrigger';
8
+ import { CooldownInfo } from '../../dtos/cooldownInfo';
9
+ import { CommandActionPropertyProvider } from '../../types/propertyProvider';
10
+ /**
11
+ * Builder for `CommandAction` with state represented by `TActionState`
12
+ */
13
+ export declare class CommandActionBuilderWithState<TActionState extends IActionState> {
14
+ private readonly name;
15
+ private trigger;
16
+ private activeProvider;
17
+ private cooldownSettingsProvider;
18
+ private blacklistProvider;
19
+ private whitelistProvider;
20
+ private allowedUsersProvider;
21
+ private readmeFactory;
22
+ private readonly stateConstructor;
23
+ private handler;
24
+ private condition;
25
+ private maxAllowedSimultaniousExecutions;
26
+ /**
27
+ * Builder for `CommandAction` with state represented by `TActionState`
28
+ * @param name Action name, will be used for logging and storage
29
+ * @param stateConstructor Function that creates default state object
30
+ */
31
+ constructor(name: string, stateConstructor: () => TActionState);
32
+ /**
33
+ * Defines action trigger
34
+ * @param trigger If `string` or `string[]` is provided, will be triggered only on exact message match.
35
+ *
36
+ * If `RegExp` or `RegExp[]` is provided, will be triggered on successful match.
37
+ */
38
+ on(trigger: CommandTrigger | CommandTrigger[]): this;
39
+ /** Defines id (or ids) of users that are allowed to trigger this action.
40
+ * @param id User id or ids
41
+ */
42
+ from(id: number | number[]): this;
43
+ /**
44
+ * Sets chats whitelist for this action.
45
+ * @param chatIds Chats ids to allow.
46
+ */
47
+ in(chatIds: number[]): this;
48
+ /**
49
+ * Sets chats blacklist for this action.
50
+ * @param chatIds Chats ids to ignore.
51
+ */
52
+ notIn(chatIds: number[]): this;
53
+ /** Defines action logic itself, will be executed on trigger.
54
+ * @param handler Callback that will be called on trigger
55
+ */
56
+ do(handler: CommandHandler<TActionState>): this;
57
+ /** Defines condition that will be checked before trigger match check is executed.
58
+ * @param condition Condition check predicate
59
+ */
60
+ when(condition: CommandCondition<TActionState>): this;
61
+ /**
62
+ * Sets factory method for readme (shown on /help) for this action.
63
+ * @param readmeFactory readme factory
64
+ */
65
+ withHelp(readmeFactory: (botName: string) => string): this;
66
+ /** If called during building, action is marked as disabled and never checked. */
67
+ disabled(): this;
68
+ /** Sets maximum number of simultaniously executing handlers for this command per chat. 0 is treated as unlimited. */
69
+ withRatelimit(maxAllowedSimultaniousExecutions: number): this;
70
+ /** Sets action cooldown settings.
71
+ * @param cooldownSettings Settings.
72
+ */
73
+ withCooldown(cooldownSettings: {
74
+ cooldown: Seconds;
75
+ message?: string;
76
+ }): this;
77
+ /**
78
+ * Configures action to use property value providers instead of static value to allow changes in runtime
79
+ */
80
+ withConfiguration(configuration: CommandActionProvidersConfiguration | (() => CommandActionProvidersConfiguration)): this;
81
+ /** Builds action */
82
+ build(): CommandAction<TActionState>;
83
+ }
84
+ export type CommandActionProvidersConfiguration = {
85
+ cooldownProvider?: CommandActionPropertyProvider<CooldownInfo>;
86
+ isActiveProvider?: CommandActionPropertyProvider<boolean>;
87
+ chatsBlacklistProvider?: CommandActionPropertyProvider<number[]>;
88
+ chatsWhitelistProvider?: CommandActionPropertyProvider<number[]>;
89
+ usersWhitelistProvider?: CommandActionPropertyProvider<number[]>;
90
+ };
91
+ /**
92
+ * Builder for `CommandAction` with state represented by default state (containing only last execution date).
93
+ */
94
+ export declare class CommandActionBuilder extends CommandActionBuilderWithState<ActionStateBase> {
95
+ /**
96
+ * Builder for `CommandAction` with state represented by default state (containing only last execution date).
97
+ */
98
+ constructor(name: string);
99
+ }
100
+ //# sourceMappingURL=commandActionBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandActionBuilder.d.ts","sourceRoot":"","sources":["../../../helpers/builders/commandActionBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E;;GAEG;AACH,qBAAa,6BAA6B,CAAC,YAAY,SAAS,YAAY;IACxE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAyC;IAExD,OAAO,CAAC,cAAc,CAAsD;IAC5E,OAAO,CAAC,wBAAwB,CACS;IACzC,OAAO,CAAC,iBAAiB,CACZ;IACb,OAAO,CAAC,iBAAiB,CACZ;IACb,OAAO,CAAC,oBAAoB,CACf;IAEb,OAAO,CAAC,aAAa,CAAiD;IACtE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAqB;IACtD,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO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