Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m1chtv/mich-gpt
OpenAI's Chat-GPT into Discord.JS
https://github.com/m1chtv/mich-gpt
bruh chatgpt discord discord-gpt discord-js discordbot discordjs openai
Last synced: 3 months ago
JSON representation
OpenAI's Chat-GPT into Discord.JS
- Host: GitHub
- URL: https://github.com/m1chtv/mich-gpt
- Owner: m1chtv
- License: mit
- Created: 2023-11-30T21:29:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-22T14:12:36.000Z (7 months ago)
- Last Synced: 2024-11-05T21:41:01.230Z (3 months ago)
- Topics: bruh, chatgpt, discord, discord-gpt, discord-js, discordbot, discordjs, openai
- Language: JavaScript
- Homepage: https://bruh.ir
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mich-gpt
![mich](https://github.com/user-attachments/assets/0a154e13-7c0d-4ba7-9429-d03853988be9)
A small module for quick implemntation of OpenAI's Chat-GPT into Discord.JS. This is the first public version of the library. For bug reports or feature requests visit https://github.com/m1chtv/mich-gpt
This module requires an OpenAI API key. You can get one [here](https://platform.openai.com/account/api-keys)
---
**Installing**
```ssh
npm i gpmich
```## Example Usage
```js
const { MichClient } = require('gpmich');const michClient = new MichClient('Your_API_Key');
client.on('messageCreate', async (message) => {
console.log('Message received:', message.content);if (message.author.bot) return;
try {
if (message.channel.id === "ChannelID") {
await michClient.chatMessage(message);
console.log('Message processed by gpmich');
}
} catch (err) {
console.error('Error processing message with gpmich:', err);
}
});
```