An open API service indexing awesome lists of open source software.

https://github.com/shin202/chatgpt-discord-bot

An advanced Discord ChatGPT bot built with NodeJs, Typescript and OpenAI API.
https://github.com/shin202/chatgpt-discord-bot

chatbot chatbots chatgpt chatgpt-discord chatgpt-discord-bot discord discord-bot discord-js discord-js-v14 gpt-3-text-generation gpt-35-turbo gpt3-turbo mongodb mongoose nodejs openai openai-api typescript

Last synced: 23 days ago
JSON representation

An advanced Discord ChatGPT bot built with NodeJs, Typescript and OpenAI API.

Awesome Lists containing this project

README

        





















Logo

ChatGPT Discord Bot


An advanced discord chatbot built with NodeJs, Typescript and OpenAI API.


Explore the docs ยป




View Demo
ยท
Report Bug
ยท
Request Feature


Table of Contents



  1. About The Project



  2. Getting Started


  3. Features

  4. Bot Commands

  5. Some Screenshots

  6. Contributing

  7. License

  8. Contact

  9. Acknowledgments

## About The Project

ChatGPT re-created with GPT-3.5 as Discord Bot. Using Typescript, NodeJs, DiscordJs and OpenAI API.

(back to top)

### Built With

* [![NodeJs][Node.js]][Node-url]
* [![Typescript][Typescript]][Typescript-url]

(back to top)

## Getting Started
I can't afford to deploy its, so you can deploy your own.

### Installation
#### Locally

1. Clone the repo
```sh
git clone https://github.com/shin202/ChatGPT-Discord-Bot
cd ChatGPT-Discord-Bot
npm install
```

1. Get your OpenAI API key at [OpenAI](https://openai.com/api/).
2. Get your Replicate API key at [Replicate](https://replicate.com/).
3. Create your discord bot at [Discord Developer](https://discord.com/developers/applications) and get your bot token.
4. Get your bot client id and your discord guild id.
5. Edit `.env.example` to set your tokens then rename it to `.env`.
6. ๐Ÿ”ฅ Run and enjoy its ๐Ÿ”ฅ
```sh
npm start
```

## Features

- Low latency replies (about 3-5 seconds)
- No request limits
- Supported chat mode: ๐Ÿ‘ฉโ€๐Ÿ’ผ LiLy: Assistant, ๐Ÿ‘จโ€๐Ÿ’ป Steve: Code Assistant, ๐Ÿ‘ฉโ€โš•๏ธ Sarah: Psychologist. (*I will add more, if I have time.*)
- Limited conversation time (*To avoid spam*).

### ๐Ÿ”ฅ NEW FEATURES
- ๐Ÿ”ฅ Add new chat mode (๐Ÿ‘จโ€๐ŸŽจ Prompt Creator) (`Help users generate unique and creative prompts for image generation.`)
- ๐Ÿ”ฅ Now you can generating image with AI by using `/draw` command.
- ๐Ÿ”ฅ Variant models for generate image.
- ๐Ÿ”ฅ Supported Models:
* `OpenJourney (Midjourney V4 Style)`
* `Stable Diffusion`
* `Portrait Plus (for portrait image)`
* `Anything V3 (anime style)`
* `Pastel Mix (anime style)`

(back to top)

## Bot commands
### Slash commands

- `/start` - Start a new conversation
- `/mode` - Select chat mode
- `/end` - End the conversation
- `/clear` - Clear user messages.

### Prefix Commands

- `!ask` - Use this to chat with ChatGPT.
- `!prefix` - Change prefix.

## Some Screenshots









## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again! โœจ

1. Fork the Project
2. Create your branch (`git checkout -b `)
3. Commit your Changes (`git commit -m `)
4. Push to the Branch (`git push origin `)
5. Open a Pull Request

(back to top)

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

(back to top)

## Contact

Shin - [email protected]

Project Link: [ChatGPT-Discord-Bot](https://github.com/shin202/ChatGPT-Discord-Bot)

(back to top)

## Acknowledgments

* [How to make your Discord Bot](https://www.youtube.com/@WornOffKeys)
* [Build Chatbot ChatGPT](https://monokaijs.com/blog/sharing/tao-chatbot-gpt)

(back to top)

[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge
[contributors-url]: https://github.com/github_username/repo_name/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge
[forks-url]: https://github.com/github_username/repo_name/network/members
[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge
[stars-url]: https://github.com/github_username/repo_name/stargazers
[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge
[issues-url]: https://github.com/github_username/repo_name/issues
[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge
[license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/linkedin_username
[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
[Next-url]: https://nextjs.org/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D
[Vue-url]: https://vuejs.org/
[Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white
[Angular-url]: https://angular.io/
[Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00
[Svelte-url]: https://svelte.dev/
[Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white
[Laravel-url]: https://laravel.com
[Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white
[Bootstrap-url]: https://getbootstrap.com
[JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white
[JQuery-url]: https://jquery.com
[Typescript]: https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white
[Typescript-url]: https://www.typescriptlang.org
[Node.js]: https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white
[Node-url]: https://nodejs.org/en
[Express.js]: https://img.shields.io/badge/Express.js-404D59?style=for-the-badge
[Express-url]: https://expressjs.com