{"id":18776198,"url":"https://github.com/billy19191/discord-gpt-bot","last_synced_at":"2025-07-12T16:37:35.192Z","repository":{"id":176626837,"uuid":"585123284","full_name":"Billy19191/Discord-GPT-Bot","owner":"Billy19191","description":"This is all of source code of Discord GPT (OpenAi) bot with a simply manage and setting!.","archived":false,"fork":false,"pushed_at":"2023-03-12T15:12:37.000Z","size":28,"stargazers_count":33,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T00:50:21.615Z","etag":null,"topics":["dailybot","github","github-campus-experts","github-codespaces","learn"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Billy19191.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-04T11:29:45.000Z","updated_at":"2025-02-06T11:23:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"4af65618-0eca-4d73-9213-65b7a5ea8228","html_url":"https://github.com/Billy19191/Discord-GPT-Bot","commit_stats":null,"previous_names":["billy19191/discord-gpt-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Billy19191/Discord-GPT-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Billy19191%2FDiscord-GPT-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Billy19191%2FDiscord-GPT-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Billy19191%2FDiscord-GPT-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Billy19191%2FDiscord-GPT-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Billy19191","download_url":"https://codeload.github.com/Billy19191/Discord-GPT-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Billy19191%2FDiscord-GPT-Bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265024279,"owners_count":23699589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dailybot","github","github-campus-experts","github-codespaces","learn"],"created_at":"2024-11-07T19:45:14.909Z","updated_at":"2025-07-12T16:37:35.173Z","avatar_url":"https://github.com/Billy19191.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord GPT Bot\n\nThis is all of the source code for the Discord GPT (OpenAI) bot using Javascript, NodeJS, and ChatGPT to connect and fetch data from the API of ChatGPT. You can type anything to ask the bot in chat and the bot will reply.\n\n## ⁉️ Requirements\n\nTo use the bot, you'll need to have all of the necessary tools below installed\n\n- Code Editor - [Visual Studio Code](https://code.visualstudio.com/), [Sublime Text](https://www.sublimetext.com/), ..., etc.\n- NodeJS - Download and install from https://nodejs.org/\n- Discord - Download and install from https://discord.com/\n\nYou'll need to have two tokens from OpenAI and Discord\n- OpenAI (ChatGPT) - Get the API token for your OpenAI account [here](https://beta.openai.com/account/api-keys) \n- Discord Developer Portal - Create a bot and get the token [here](https://discord.com/developers/applications)\n\n## 🛠 Installation\n\nFirst, install the required JavaScript libraries by pasting code below in your terminal or command prompt.\n\n```\nnpm install openai discord.js dotenv\n```\n\nNext step, download all of the code as a .zip file and open it in your code editor of choise to put your own bot token and OpenAI API key.\n\nYou may also run `git clone`, if you have git installed\n\n```\ngit clone https://github.com/Billy19191/Discord-GPT-Bot.git\n```\n\n**.ENV** file\n\nFile name must be `.env`, paste the API key and your Discord bot token by replacing the \"Paste your API key here\" and \"Paste your bot token here\"\n\n    OPENAI_API_KEY=Paste your API key here\n    DISCORD_BOT_TOKEN=Paste your bot token here\n\n**index.js**\n\nPaste the channel ID in your server which you want this bot to be working only in that channel, if you want it work for all channel, replace the code that you see here:\n\n     if (message.channel.id === 'INPUT_YOUR_CHANNEL_ID') {\n       message.reply(gptResponse.data.choices[0].text.substring(0));\n       console.log('Answer Reply!');\n       prompt += `${gptResponse.data.choices[0].text}\\n`;\n     } else {\n       prompt += `${gptResponse.data.choices[0].text}\\n`;\n     }\n\nwith this one below:\n\n     message.reply(gptResponse.data.choices[0].text.substring(0));\n     console.log('Answer Reply!');\n     prompt += `${gptResponse.data.choices[0].text}\\n`;\nAfter all environments are set, installation is finished!\n\n## 🖥 Usage\n\nStart a terminal session, then cd into the project\n```\ncd ./Discord-GPT-Bot/\n```\n\nRun the `index.js` file using node\n```\nnode index.js\n```\n\nIf you did everything correctly, the script should be working properly, a message will show up in the terminal:  ***Bot Start \u0026 Login Successful!***\n\nYour bot is now online on Discord.\n\n## 🖥 Example\n\u003cimg width=\"897\" alt=\"Screenshot 2023-01-10 at 16 44 35\" src=\"https://user-images.githubusercontent.com/27849965/211517040-6c36eb77-7717-4e30-b244-4ee30064984b.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly19191%2Fdiscord-gpt-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilly19191%2Fdiscord-gpt-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly19191%2Fdiscord-gpt-bot/lists"}