@gamastudio/sendwave-provider 0.0.4 → 0.0.6
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/build/package.json
CHANGED
|
@@ -46,6 +46,8 @@ export declare class SendWaveProvider extends ProviderClass<SendWaveCore> {
|
|
|
46
46
|
sendPresence(...args: Parameters<SenderMessage["sendPresence"]>): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
47
47
|
sendVoice(...args: Parameters<SenderMessage["sendVoice"]>): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
48
48
|
sendButton(...args: Parameters<SenderMessage["sendButton"]>): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
49
|
+
sendReaction(...args: Parameters<SenderMessage["sendReaction"]>): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
50
|
+
sendLocation(...args: Parameters<SenderMessage["sendLocation"]>): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
49
51
|
/**
|
|
50
52
|
* Reset user timeout for queue flow system
|
|
51
53
|
*/
|
|
@@ -95,7 +95,8 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
95
95
|
func: (payload) => {
|
|
96
96
|
var _a;
|
|
97
97
|
// Auto-reset timeout for queue flow when user sends a message (AUTOMATIC)
|
|
98
|
-
if (((_a = this.globalVendorArgs.queueFlow) === null || _a === void 0 ? void 0 : _a.enabled) &&
|
|
98
|
+
if (((_a = this.globalVendorArgs.queueFlow) === null || _a === void 0 ? void 0 : _a.enabled) &&
|
|
99
|
+
!payload.from.includes("@")) {
|
|
99
100
|
this.resetUserTimeout(payload.from, payload.name);
|
|
100
101
|
}
|
|
101
102
|
this.emit("message", payload);
|
|
@@ -307,6 +308,12 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
307
308
|
sendButton(...args) {
|
|
308
309
|
return this.sender.sendButton(...args);
|
|
309
310
|
}
|
|
311
|
+
sendReaction(...args) {
|
|
312
|
+
return this.sender.sendReaction(...args);
|
|
313
|
+
}
|
|
314
|
+
sendLocation(...args) {
|
|
315
|
+
return this.sender.sendLocation(...args);
|
|
316
|
+
}
|
|
310
317
|
// Queue Flow Management Methods
|
|
311
318
|
/**
|
|
312
319
|
* Reset user timeout for queue flow system
|
package/build/provider/sender.js
CHANGED
|
@@ -219,7 +219,6 @@ class SenderMessage {
|
|
|
219
219
|
var _a, _b;
|
|
220
220
|
try {
|
|
221
221
|
return await ((_a = this.sendwaveApi) === null || _a === void 0 ? void 0 : _a.post(`/message/sendReaction/${(_b = this.globalVendorArgs) === null || _b === void 0 ? void 0 : _b.name}`, {
|
|
222
|
-
number: data.from.split("@")[0],
|
|
223
222
|
key: data.key,
|
|
224
223
|
reaction: data.reaction,
|
|
225
224
|
...this.globalVendorArgs,
|