chz-telegram-bot 0.3.19 → 0.3.22
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/dist/entities/actions/commandAction.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/entities/actions/commandAction.ts +1 -1
- package/index.ts +3 -0
- package/package.json +1 -1
- /package/dist/dtos/{ActionPermissionsData.d.ts → actionPermissionsData.d.ts} +0 -0
- /package/dist/dtos/{ActionPermissionsData.d.ts.map → actionPermissionsData.d.ts.map} +0 -0
- /package/dist/dtos/{ActionPermissionsData.js → actionPermissionsData.js} +0 -0
|
@@ -87,7 +87,7 @@ class CommandAction {
|
|
|
87
87
|
if (!this.active)
|
|
88
88
|
return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('ActionDisabled');
|
|
89
89
|
const isChatInBlacklist = this.chatsBlacklist.includes(ctx.chatInfo.id);
|
|
90
|
-
const isChatInWhitelist = this.chatsWhitelist.length
|
|
90
|
+
const isChatInWhitelist = this.chatsWhitelist.length == 0 ||
|
|
91
91
|
this.chatsWhitelist.includes(ctx.chatInfo.id);
|
|
92
92
|
if (isChatInBlacklist || !isChatInWhitelist)
|
|
93
93
|
return commandTriggerCheckResult_1.CommandTriggerCheckResult.DontTriggerAndSkipCooldown('ChatForbidden');
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,7 @@ export { InlineQueryContext } from './entities/context/inlineQueryContext';
|
|
|
16
16
|
export { MessageContext } from './entities/context/messageContext';
|
|
17
17
|
export { ReplyContext } from './entities/context/replyContext';
|
|
18
18
|
export { ICaptureController } from './types/capture';
|
|
19
|
+
export { ChatInfo } from './dtos/chatInfo';
|
|
20
|
+
export { MessageInfo } from './dtos/messageInfo';
|
|
21
|
+
export { UserInfo } from './dtos/userInfo';
|
|
19
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qBAAqB,CAAC;AACpC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ScheduledAction = exports.ReplyCaptureAction = exports.InlineQueryAction = exports.CommandAction = void 0;
|
|
17
|
+
exports.UserInfo = exports.MessageInfo = exports.ChatInfo = exports.ScheduledAction = exports.ReplyCaptureAction = exports.InlineQueryAction = exports.CommandAction = void 0;
|
|
18
18
|
__exportStar(require("./main"), exports);
|
|
19
19
|
__exportStar(require("./helpers/builders/inlineQueryActionBuilder"), exports);
|
|
20
20
|
__exportStar(require("./helpers/builders/commandActionBuilder"), exports);
|
|
@@ -31,3 +31,9 @@ var replyCaptureAction_1 = require("./entities/actions/replyCaptureAction");
|
|
|
31
31
|
Object.defineProperty(exports, "ReplyCaptureAction", { enumerable: true, get: function () { return replyCaptureAction_1.ReplyCaptureAction; } });
|
|
32
32
|
var scheduledAction_1 = require("./entities/actions/scheduledAction");
|
|
33
33
|
Object.defineProperty(exports, "ScheduledAction", { enumerable: true, get: function () { return scheduledAction_1.ScheduledAction; } });
|
|
34
|
+
var chatInfo_1 = require("./dtos/chatInfo");
|
|
35
|
+
Object.defineProperty(exports, "ChatInfo", { enumerable: true, get: function () { return chatInfo_1.ChatInfo; } });
|
|
36
|
+
var messageInfo_1 = require("./dtos/messageInfo");
|
|
37
|
+
Object.defineProperty(exports, "MessageInfo", { enumerable: true, get: function () { return messageInfo_1.MessageInfo; } });
|
|
38
|
+
var userInfo_1 = require("./dtos/userInfo");
|
|
39
|
+
Object.defineProperty(exports, "UserInfo", { enumerable: true, get: function () { return userInfo_1.UserInfo; } });
|
|
@@ -155,7 +155,7 @@ export class CommandAction<TActionState extends IActionState>
|
|
|
155
155
|
|
|
156
156
|
const isChatInBlacklist = this.chatsBlacklist.includes(ctx.chatInfo.id);
|
|
157
157
|
const isChatInWhitelist =
|
|
158
|
-
this.chatsWhitelist.length
|
|
158
|
+
this.chatsWhitelist.length == 0 ||
|
|
159
159
|
this.chatsWhitelist.includes(ctx.chatInfo.id);
|
|
160
160
|
|
|
161
161
|
if (isChatInBlacklist || !isChatInWhitelist)
|
package/index.ts
CHANGED
|
@@ -16,3 +16,6 @@ export { InlineQueryContext } from './entities/context/inlineQueryContext';
|
|
|
16
16
|
export { MessageContext } from './entities/context/messageContext';
|
|
17
17
|
export { ReplyContext } from './entities/context/replyContext';
|
|
18
18
|
export { ICaptureController } from './types/capture';
|
|
19
|
+
export { ChatInfo } from './dtos/chatInfo';
|
|
20
|
+
export { MessageInfo } from './dtos/messageInfo';
|
|
21
|
+
export { UserInfo } from './dtos/userInfo';
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|