This is the code for a discord bot that will talk to you. It uses the google bard api to respond to messages. There are some issues with the length of responces but they will be fixed.
For this to work the bot will need all permissions in the "text permissions" coloum and "Read messages/View channels" in the "General Permissions" coloum.
You will also need tokens for both your discord bot, which can be generated in the developer portal, and a google bard token.
For this to work you will need to pip install both the discord and bardapi pakages.
Chat bot in python: https://www.youtube.com/watch?v=qhmaDOo7D_E
Discord bot: https://www.youtube.com/watch?v=hoDLj0IzZMU