Commit 062a2c08 authored by nanahira's avatar nanahira

fix appel

parent 1299b373
......@@ -83,11 +83,12 @@ export default class ChatGPTApiPlugin
@UseMiddleware()
middleware(session: Session, next: Next) {
if (
(!this.config.prefix.length && session.content) ||
session.parsed?.appel
)
if (session.parsed?.appel) {
return this.handle(session, session.parsed.content);
}
if (!this.config.prefix.length && session.content) {
return this.handle(session, session.content);
}
const matchingPrefix = this.config.prefix.find((prefix) =>
session.content.startsWith(prefix),
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment