DiscordBot-BardGPT
Using Google Bard Chat AI on discord bot.
Update
2023/7/19 : Message can contain image.
2023/7/15 : Use another Bard api so the chatbot can work again.
2023/6/5 : Use SQLite storage of individual cookies so it doesn't reset when the bot restarts, it can also be exported for later use.
Features
Slash command
will create a personal conversation for each user.
Mention bot
same feature as the slash command, but this will reply all user messages.
Prefix command (available only to bot owner)
bot owner setting.
-
!bardunload [file_name_in_cogs_folder]
: Disable command from the specified file. -
!bardload [file_name_in_cogs_folder]
: Enable the command from the specified file. -
!bardclean
: Empty discord_bot.log file. -
!bardgetLog
: Get discord_bot.log file. Real-time tracking of the bot's operating status. -
!bardgetdb
: Export Bard_id.db file
Install
pip install -r requirements.txt
Usage
-
Get Google Bard authentication.
- Go to https://bard.google.com/
- F12 for console
- ___SECURE_1PSID: Go to Application → Cookies →
__Secure-1PSID
. Copy the value of that cookie.
-
Rename the file
.env.dev
to.env
, then open it and edit it. If you don't want a limit channel to mention a bot, you don't need to set up a MENTION_CHANNEL_ID, just leave it blank.DISCORD_BOT_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX MENTION_CHANNEL_ID=123456789 ___SECURE_1PSID=
-
Start run your bot, hosted locally or on a server.
-> Recommended Free Servers: fly.io
Credits
Contributors
This project exists thanks to all the people who contribute.