Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
itskdhere committed Jan 12, 2023
1 parent 8914acc commit bbf9878
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ npm install
```bash
npm run start
```
6. Complete the **CAPTCHA** Manually *or* [Use This Automation](https://github.com/transitive-bullshit/chatgpt-api#captchas)
6. Complete the **CAPTCHA** Manually *or* [Use This Automation](https://github.com/transitive-bullshit/chatgpt-api#captchas). If you're using Google Login then you can skip step 6.

7. Use the BOT 🎉

Expand All @@ -52,3 +52,8 @@ npm run start
##### 📝 License: [MIT](https://github.com/itskdhere/ChatGPT-Discord-BOT/blob/main/LICENSE)
##### 🔋 ChatGPT API: [transitive-bullshit/chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api)
##### 💡 Initial Inspiration: [onury5506/Discord-ChatGPT-Bot](https://github.com/onury5506/Discord-ChatGPT-Bot)

<br>
<p align='center'>
--- 🙂 ---
</p>
12 changes: 7 additions & 5 deletions env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Never Push The ".env" File To GitHub (Your Discord BOT and/or OpenAI Might Get Compromised)

# Discord BOT Credentials from "Discord Developer Portal"
DISCORD_CLIENT_ID=
DISCORD_BOT_TOKEN=
DISCORD_CLIENT_ID=42069420694206942069
DISCORD_BOT_TOKEN=$uper$ecrectT0ken

# Account Login Credentials
EMAIL=
PASSWORD=
# For 'Google' login type provide the gmail and the google account password of the gmailID
# For 'OpenAI' login type provide the email and password associated with your OpenAI account
EMAIL=username@provider.tld
PASSWORD=$uper$ecrectP@ssw0rd

# Login Type, google / openai
# Login Type,( Value: 'google' or 'openai' )
LOGIN_TYPE=openai
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Imports
import dotenv from 'dotenv'; dotenv.config();
import { ChatGPTAPIBrowser } from 'chatgpt';
import { Client, GatewayIntentBits, REST, Routes, Partials, ActivityType, Collection, ChannelType } from 'discord.js';
import { Client, GatewayIntentBits, REST, Routes, Partials, ActivityType} from 'discord.js';
import axios from 'axios';

// Defines
Expand Down Expand Up @@ -49,7 +49,7 @@ async function initOpenAI() {
return api;
}
else {
console.log('Not a valid loginType; use "google" or "openai" ');
console.log('Not a valid loginType; use "google" or "openai" in .env file');
}
}

Expand Down Expand Up @@ -192,4 +192,4 @@ setInterval(() => {
}
});

}, 100000);
}, 60000); // Every 1 Minute
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatgpt-discord-bot",
"version": "2.1.0",
"version": "2.2.0",
"description": "ChatGPT Discord BOT",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit bbf9878

Please sign in to comment.