Skip to content
 
 

Latest commit

 

History

93 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Google Assistant Bot

A bot that hangs out in Discord and sometimes talks to Google Assistant.




Features

Bot

  • Hangs out in the voice chat, plays music from YouTube, SoundCloud, etc. through youtube-dl.
  • Responds to guild messages with custom user-defined responses, available through an easily-accessible Google Sheets link.

Google Assistant Action

  • Google Assistant intent for asking which members of a Discord guild are online.

Installation

  • Create a Discord bot account and invite it to your server.
  • cd to the project directory, and run the installer script python3 install.py (Mac users should run 'install.sh').
  • Note: The bot's dependencies require that you use Python 3.6!
  • The bot's command prefix defaults to .. This can be configured to suit your guild's needs.
  • Note: Some low-level dependencies such as ffmpeg may not be pip-able on your system. You'll need to install these dependencies yourself.

Google Assistant Setup

If you want to use Google Assistant features, follow the Dialogflow setup instructions. Set the fulfillment URL to point to your hosted index.py.

  • If you need free web hosting, you host your web service locally and expose a port to the web using a tool like Serveo.

Custom Bot Responses

The bot uses Google Sheets as a shared database of custom responses. This Sheet can be edited on-the-fly to setup custom bot text or audio responses to text typed in the Discord channels.

Create a new Sheet and configure a service account for the bot following this tutorial. If you wish, share the link with your guild's members to allow them to add their own flavor to the bot.

Note: The video tutorial states to use the Google Drive API; use the Google Sheets API instead. All other steps are the same.


Usage

Vanilla bot

Run python3 bot/bot_service.py (Mac users should run bot/bot_service.sh) to run the Discord bot without any fancy Google Assistant functionality.

Google Assistant mode

Run the Sanic server with python3 bot/index.py. This will run the web server at http://localhost:8000.

If you're hosting the bot elsewhere, run the server the way you're used to. You may need to edit the configuration in index.py.

Type <command_prefix> help to see what the bot can do!

Roadmap

  • More bot features. Got an idea? Open an issue!

Credit

  • Some of the code in bot/bot.py was taken from discord.py, as some modifications to the default help message required that the default methods be overridden, and as the original code was quite close to what was required already it made sense to copy said code and modify it as necessary in the overridden methods.

About

A bot that hangs out in Discord and sometimes talks to Google Assistant.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages