Releases: Kevin8675/ChatGPT-Discord-Bot
v2.5.0
This release comes with a few new features and some code cleanup. Full changelog:
- Added option for personality descriptions: You can add personality descriptions in your
.env
file which would display instead of the personality prompt in/personalities
. Not giving a description will show the prompt instead. - Added channel configuration: You can specify which channel the bot will respond in in your
.env
file, either by channel name or ID. - Added bot slow mode: You can now configure slow mode for the bot server side instead of relying on Discord's slow mode.
- Code cleanup/optimizations.
Update your .env
file if you want to use these new features. Your .env
file may also have duplicate entries of the Disable, Enable, Reset, Disabled, and Command perm messages. You can delete the duplicates as they were included in .env.example
accidentally. The command perm messages you can delete both of as they are no longer in use.
Enjoy this release!
v2.4.0
This release comes with a handful of features. The big one being support for discord threads. None of the changes requires changes to your .env
file if you don't want to use these features.
Here is the full changelog:
- Added support for threads: Bot will auto reply in joined threads if a personality can be found in the thread. Threads don't support multiple personalities.
- Added support for running with a different
.env
file. Run the bot with.env
file name argument and the bot will start using that.env
. Eg:npm start bot1.env
- Added support for ignoring/deleting commands in
deploy-commands.js
. (Thanks @JrdnRgrs) - Added money option in
/token-count
(displays token usage in USD) - OPTIONAL Added "Unrestricted Roles" option: Roles that can use bot without token restrictions outside of admins.
- Changed priority of personality checker: Now goes
Reply > Thread > Personality Name
. - Fixed replying to discord system messages.
Enjoy this release!
v2.3.1
v2.3.0
This release fixes a MAJOR security vulnerability where any user could DM the bot and have access to all admin commands in the DM, allowing them to enable/disable the bot or reset the token counter, all while completly under the radar from admins. This vulnerability affects ALL PREVIOUS VERSIONS OF THE BOT! Please upgrade ASAP as this vulnerability is now known. Run node deploy-commands.js
after upgrading as not doing so will not fix anything.
This release has a few other features included which should optimize costs for the API. Below is a full changelog:
- Fixed allowing all commands in DM security vulnerability.
- Added a total token count which shows the total number of tokens used since the bot was started or the start of the month (if the bot has been running for multiple months).
- Added a configurable conversation history truncator to save tokens (will cut the conversation history based on MSG_LIMIT in
.env
). - Added an npm script so the bot can be run with
npm start
ornpm run start
Your .env
also needs some additional parameters which can be seen in .env.example
v2.2.0
This release adds a handful of new features, including a token usage limiter, an add personality command, and better error handling.
Upgrading users: You need to add a few options to your .env
file. See .env.example
for the changes.
Here is the full changelog for this release:
- Added a token usage limiter. This will limit the amount of completion tokens used within a span of time. See
.env.example
for configuration options. - Added a
/add-personality
command. (Thanks @JrdnRgrs!) Used to temporarily add personalities to the bot. Can be used for testing or playing with personalities/prompts. /personalities
now uses a Discord embed and includes the personality's prompts. (Thanks @JrdnRgrs!)- The bot will now respond to replies to it's messages without including the personality name.
- Added better error handling.
- Improved personality name finder. It will no longer respond if the name of a personality is in a word. Eg: A personality named "gpt" will no longer get called when someone says "chatgpt"
- Updated dependencies.
I hope you all enjoy this release!
v2.1.0
This release migrates to Discord slash commands! Now instead of using the "!" prefix you use "/" as many other Discord bots now do.
Upgrading users: Please run node deploy-commands.js
to deploy the commands to the servers the bot is in. No changes are needed to .env
unless wanted. (check changelog below)
New users: Follow the Setup/Installation instructions in the README.
Here is the full changelog for this release:
- Migrated bot commands to slash commands
- Uncomment example personality for faster setup for users to quickly try the bot
- Added option to enable the bot to reply to other bots. (Upgrading users see .env.example on how to enable this if wanted)
Enjoy!
v2.0.0
This release was initially meant to be v1.1.0 but there is a lot of new features which requires changes to .env files. This release has a lot of new features and changes though, so get ready.
- Added a message splitter for messages longer than 2000 characters.
- Admin checks are now based on Discord permissions. If a user has "Administrator" or "Manage Messages" permissions, they will have admin access to the bot. ADMIN_ID has been kept in .env for adding admin access to bot for users without the permissions.
- Reset command is available to all users due to the often need to reset the bot.
- Reset command can now reset single personalities.
- Added typing indicators when making request to ChatGPT. (Note that the indicator disappears after 10 seconds. This doesnt mean that the request returned an error, it is simply a restriction of Discord.JS)
- Added an option to enable replying to messages in Discord. (Default now)
- Added a simple list personality command. The command just lists the personality names for now.
Please see .env.example for options you need to change and add. I hope you enjoy this release!