mirror of
https://github.com/uditkarode/bing-chat-telegram.git
synced 2025-02-22 09:12:21 +00:00
fix: use string instead of FmtString
This commit is contained in:
parent
23e78dbb81
commit
7bd82c943c
@ -37,11 +37,12 @@ export async function ai(ctx: Context<Update>, prompt: string) {
|
||||
);
|
||||
chats[chatId].res = bingRes;
|
||||
|
||||
let tgRes: FmtString;
|
||||
let tgRes: FmtString | string;
|
||||
if (bingRes.text === prompt) {
|
||||
// Bing Chat often replies with the exact prompt
|
||||
// in case it's unable to continue the conversation.
|
||||
tgRes = fmt`Something went wrong. Starting a new chat with /newchat is recommended.`;
|
||||
tgRes =
|
||||
"Something went wrong. Starting a new chat with /newchat is recommended.";
|
||||
} else {
|
||||
tgRes = transformBingResponse(bingRes);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user