Skip to content

Commit

Permalink
⚡️ Log in to Chatgpt logic in advance
Browse files Browse the repository at this point in the history
  • Loading branch information
fuergaosi233 committed Dec 28, 2022
1 parent 999b3fe commit 79b55b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const bot = WechatyBuilder.build({
// get a Wechaty instance

async function main() {
await chatGPTBot.startGPTBot();
bot
.on("scan", async (qrcode, status) => {
const url = `https://wechaty.js.org/qrcode/${encodeURIComponent(qrcode)}`;
Expand All @@ -24,7 +25,6 @@ async function main() {
.on("login", async (user) => {
console.log(`User ${user} logged in`);
chatGPTBot.setBotName(user.name());
await chatGPTBot.startGPTBot();
})
.on("message", async (message) => {
if (!chatGPTBot.ready) {
Expand Down

0 comments on commit 79b55b8

Please sign in to comment.