1 | const events = require('./config/events');
|
2 |
|
3 | const VkBotSdkApi = require('./api');
|
4 | const VkBotSdkClient = require('./client');
|
5 | const VkBotSdkCallback = require('./callback');
|
6 |
|
7 | const {
|
8 | Context, Keyboard, Attachment,
|
9 | Button, TextButton, LinkButton, LocationButton, VKPayButton, VKAppButton
|
10 | } = require('./interfaces');
|
11 |
|
12 | const {
|
13 | redisStorage
|
14 | } = require('./middlewares');
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | class VkBotSdk {
|
55 | constructor(options = {}) {
|
56 | this.client = new VkBotSdkClient(options);
|
57 | this.api = new VkBotSdkApi(this.client);
|
58 | this.callback = new VkBotSdkCallback(this.client);
|
59 | }
|
60 |
|
61 | |
62 |
|
63 |
|
64 |
|
65 | getApi() {
|
66 | return this.api;
|
67 | }
|
68 |
|
69 | |
70 |
|
71 |
|
72 |
|
73 | getCallback() {
|
74 | return this.callback;
|
75 | }
|
76 |
|
77 | |
78 |
|
79 |
|
80 |
|
81 | getClient() {
|
82 | return this.client;
|
83 | }
|
84 | }
|
85 |
|
86 |
|
87 | module.exports = VkBotSdk;
|
88 | module.exports.VkBotSdk = VkBotSdk;
|
89 |
|
90 |
|
91 | module.exports.events = events;
|
92 | module.exports.context = Context;
|
93 | module.exports.keyboard = Keyboard;
|
94 | module.exports.attachment = Attachment;
|
95 | module.exports.button = Button;
|
96 | module.exports.textButton = TextButton;
|
97 | module.exports.linkButton = LinkButton;
|
98 | module.exports.locationButton = LocationButton;
|
99 | module.exports.vkpayButton = VKPayButton;
|
100 | module.exports.vkappButton = VKAppButton;
|
101 |
|
102 |
|
103 | module.exports.Events = events;
|
104 | module.exports.Context = Context;
|
105 | module.exports.Keyboard = Keyboard;
|
106 | module.exports.Attachment = Attachment;
|
107 | module.exports.Button = Button;
|
108 | module.exports.TextButton = TextButton;
|
109 | module.exports.LinkButton = LinkButton;
|
110 | module.exports.LocationButton = LocationButton;
|
111 | module.exports.VKPayButton = VKPayButton;
|
112 | module.exports.VKAppButton = VKAppButton;
|
113 |
|
114 |
|
115 | module.exports.redisStorage = redisStorage;
|