fix: use string instead of FmtString

This commit is contained in:
Udit Karode 2023-04-08 11:03:30 +05:30
parent 23e78dbb81
commit 7bd82c943c
No known key found for this signature in database
GPG Key ID: 864BAA48465205F0

View File

@ -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);
}