https://github.com/codemage66/discordbot
A discord bot for interact with ChatGPT
https://github.com/codemage66/discordbot
bot chatbot chatgpt chatgpt-whatsapp-bot discord discord-bot gpt-3
Last synced: about 1 month ago
JSON representation
A discord bot for interact with ChatGPT
- Host: GitHub
- URL: https://github.com/codemage66/discordbot
- Owner: codemage66
- License: apache-2.0
- Created: 2024-04-24T06:32:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T06:39:07.000Z (about 2 years ago)
- Last Synced: 2025-03-13T10:34:12.242Z (about 1 year ago)
- Topics: bot, chatbot, chatgpt, chatgpt-whatsapp-bot, discord, discord-bot, gpt-3
- Language: TypeScript
- Homepage:
- Size: 1.27 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# chatgpt-bot
A discord bot for interact with ChatGPT
[](https://ko-fi.com/U7U5H70V5)
## Setup Guide
1. Clone repository
```bash
git clone https://github.com/MrlolDev/chatgpt-discord-bot.git
```
2. Create supabase project
3. Create supabase tables
Table: accounts
Fields (name, dataType): (id,uuid), (created_at, timestamp), (email, text), (password, text), (abled, boolean), (totalMessages, numeric), (lastUse, numeric), (key, text)
In this table it is only required the key(open ai key), abled(true), messages(0) and id property(random UUID).
Table: chatsonic
Fields (name, dataType): (id,uuid), (created_at, timestamp), (key, text)
Table: conversations
Fields (name, dataType): (id,uuid), (created_at, timestamp), (account, uuid, foreign key points to Account) , (conversation, jsonb), (lastMessage, numeric), (userId, text)
Table: cooldown
Fields (name, dataType): (id,uuid), (created_at, timestamp), (userId, text), (command, text)
Table: results
Fields (name, dataType): (id,uuid), (created_at, timestamp), (prompt, text), (provider, text), (result, jsonb), (uses, numeric), (guildId, text)
4. Upload open ai accounts
5. Install dependencies
```
npm install
```
6. Create .env
```env
TOKEN=Your discord bot token https://discord.dev
CLIENT_ID=Your discord bot id https://discord.dev
SUPABASE_KEY=Your supabase service role key https://app.supabase.com
SUPABASE_URL=Your supabase project url https://app.supabase.com
```
7. Run the bot
```
npm start
```
8. Running with auto reload(development mode)
```
npm run dev
```
9. Updating code with changes.
```
npm run git
```
## TO DO:
- [ ] Embeds --> Future
- [ ] Top.gg rewards --> Future
- [ ] Uptime Robot alerts --> Future