Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #60 from matrixgpt/match-timeouts
Browse files Browse the repository at this point in the history
Update handlers.ts
  • Loading branch information
bertybuttface authored Jan 24, 2023
2 parents de452be + f1bc898 commit 799760e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChatGPTAPIBrowser } from "chatgpt";
import { LogService, MatrixClient, UserID } from "matrix-bot-sdk";
import { MATRIX_DEFAULT_PREFIX_REPLY, MATRIX_DEFAULT_PREFIX, MATRIX_BLACKLIST, MATRIX_WHITELIST, MATRIX_RICH_TEXT, MATRIX_PREFIX_DM } from "./env.js";
import { CHATGPT_TIMEOUT, MATRIX_DEFAULT_PREFIX_REPLY, MATRIX_DEFAULT_PREFIX, MATRIX_BLACKLIST, MATRIX_WHITELIST, MATRIX_RICH_TEXT, MATRIX_PREFIX_DM } from "./env.js";
import { RelatesTo, MessageEvent, StoredConversation, StoredConversationConfig } from "./interfaces.js";
import { sendChatGPTMessage, sendError, sendThreadReply } from "./utils.js";

Expand Down Expand Up @@ -100,7 +100,7 @@ export default class CommandHandler {

await Promise.all([
this.client.sendReadReceipt(roomId, event.event_id),
this.client.setTyping(roomId, true, 10000)
this.client.setTyping(roomId, true, CHATGPT_TIMEOUT)
]);

const bodyWithoutPrefix = this.getBodyWithoutPrefix(event, config, shouldBePrefixed);
Expand Down

0 comments on commit 799760e

Please sign in to comment.