Skip to content

Integrate Google Bard into your own discord chatbot

Notifications You must be signed in to change notification settings

xn4k/Bard-Discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Prerequisites to install

  • run pip3 install -r requirements.txt

Step 1: Create a Discord bot

  1. Go to https://discord.com/developers/applications create an application

  2. Build a Discord bot under the application

  3. Get the token from bot setting

    image

  4. Store the token to config.ini under discord_bot_token

    image
  5. Turn MESSAGE CONTENT INTENT ON

    image

  6. Invite your bot to your server via OAuth2 URL Generator

    image

Authentication

  1. Visit https://bard.google.com/
  2. F12 for console
  3. Session: Application → Cookies → Copy the value of __Secure-1PSID cookie.

Step 3: Run the bot on the desktop

  1. Open a terminal or command prompt

  2. Navigate to the directory where you installed the Bard Discord bot

  3. Run python3 main.py or python main.py to start the bot

Step 4. Invite the bot

image

New

  • Added logging function, so you can watch through the logs to see how people use it

Commands

  • /help: Displays a list of all available commands
  • /chat: Chat with Bard
  • /reset: Reset bot's context
  • /public: Toggle if bot should respond to all messages in chat
  • /private: Toggle if bot should only respond to /chat
  • /images: Toggle if bot should respond with images
  • /author: Provide information about the author
  • /ascii: Generate ASCII art from text
  • /remind: Create a reminder so the bot reminds you in x ammount of time
  • /joke: Bot makes a random programmer joke xD

Credits

Some of this README.md is from Zero6992 Codebase is from armintum

About

Integrate Google Bard into your own discord chatbot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published