@codebam/cf-workers-telegram-bot 12.6.6 → 12.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.
|
@@ -9,7 +9,7 @@ export declare class HistoryManager {
|
|
|
9
9
|
* @param threadId - optional thread ID
|
|
10
10
|
* @returns array of messages
|
|
11
11
|
*/
|
|
12
|
-
getHistory(userId: number, threadId?: number): Promise<{
|
|
12
|
+
getHistory(userId: number | string, threadId?: number): Promise<{
|
|
13
13
|
role: string;
|
|
14
14
|
content: string;
|
|
15
15
|
}[]>;
|
|
@@ -20,13 +20,13 @@ export declare class HistoryManager {
|
|
|
20
20
|
* @param response - the bot response
|
|
21
21
|
* @param threadId - optional thread ID
|
|
22
22
|
*/
|
|
23
|
-
addMessage(userId: number, prompt: string, response: string, threadId?: number): Promise<void>;
|
|
23
|
+
addMessage(userId: number | string, prompt: string, response: string, threadId?: number): Promise<void>;
|
|
24
24
|
/**
|
|
25
25
|
* Clear the conversation history for a user
|
|
26
26
|
* @param userId - the telegram user ID
|
|
27
27
|
* @param threadId - optional thread ID
|
|
28
28
|
*/
|
|
29
|
-
clearHistory(userId: number, threadId?: number): Promise<void>;
|
|
29
|
+
clearHistory(userId: number | string, threadId?: number): Promise<void>;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Get the balance for a user, initializing it if it doesn't exist
|
package/dist/telegram_bot.js
CHANGED
|
@@ -120,7 +120,8 @@ export default class TelegramBot {
|
|
|
120
120
|
// For guest messages, we fall through to command detection if it's not a special type
|
|
121
121
|
break;
|
|
122
122
|
case 'business_message':
|
|
123
|
-
|
|
123
|
+
// For business messages, we fall through to command detection if it's not a special type
|
|
124
|
+
break;
|
|
124
125
|
case 'pre_checkout_query':
|
|
125
126
|
return ':pre_checkout_query' in this.commands ? ':pre_checkout_query' : this.defaultCommand;
|
|
126
127
|
case 'successful_payment':
|