An open API service indexing awesome lists of open source software.

https://github.com/botstudios/bard-discord-bot

Google Bard on Discord
https://github.com/botstudios/bard-discord-bot

discord-bot discordjs google google-bard

Last synced: 24 days ago
JSON representation

Google Bard on Discord

Awesome Lists containing this project

README

        

# [Bard](https://bard.google.com) on [Discord](https://discord.com/)
A discord.js bot with **Google's Bard** integration

> This project is made possible by [PawanOsman's GoogleBard library](https://github.com/PawanOsman/GoogleBard)

## About
- Supports reply by `Message Content` or `Interaction Reply`
- Uses `discord.js@v13` (not LTS)
- Supports continuous conversation (DM only)
- Easy to setup (need an access to Bard)








## How to setup
**Grab cookie**
1. Visit [bard.google.com](https://bard.google.com)
2. Press F12 (open developer console)
3. Go to Application → Cookies → `__Secure-1PSID`. Copy the value of that cookie.

**Setup the bot**
1. Edit [`config.js`](/config.js), replace `COOKIE` with the cookie you've just copied & `TOKEN` with your Discord bot's token
2. Run the following commands to start the bot
```sh
$ npm install # install dependencies
$ npm run register # to register a slash command (you only have to run once)
$ npm start # start the bot
```

**Ways to use**
- Use `/ask prompt:` to ask a question (after registering the slash command)
- DM the bot with your question (for continuous conversation)

> **Note**
> For **MessageCommand Support**
> 1. Enable the **Message Content Intent** in your [Discord Bot Portal](https://discord.com/developers) - place where you obtain your bot token
> 2. Set the value of `messageCommand` in [config.js](/config.js) to `true`
>
> You may now send `!ask ` in a server/guild, this is tantamount to the `/ask` slash command

## Questions/Contributions
Feel free to create an [issue](https://github.com/BotStudios/bard-discord-bot/issues) for any help/concern. Contributions are always welcome, just create a pull request!

## License
This project is available as an open source under the terms of the [MIT License](/LICENSE)