GithubHelp home page GithubHelp logo

pg8wood / discord-voice-assistant-bot Goto Github PK

View Code? Open in Web Editor NEW
22.0 8.0 11.0 864 KB

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

License: MIT License

Python 96.34% Shell 3.66%
python3 sanic discord-bot dialogflow google-assistant discordpy

discord-voice-assistant-bot's Introduction

Discord Google Assistant Bot

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




Features

Discord 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.
  • Run the installation script. Linux & Mac: install.sh Windows: python3 install.py
  • 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

Regular bot

The bot can be run without any fancy Google Assistant functionality.

Linux & Mac: bot_service.sh Windows: python3 bot_service.py

Optional Arguments: dev - supress announcing the bot's online status

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!

Attribution

  • Powered by discord.py.
  • Formatting for the help command is modified from the example provided by discord.py.

discord-voice-assistant-bot's People

Contributors

dependabot[bot] avatar pg8wood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-voice-assistant-bot's Issues

Sheets config?

Any sheets config? or possibility of disabling using them?

Command Channel Filtering

Many guilds would benefit from the ability to limit bot usage to a channel or a set of channels, allowing users to freely mute these channels and reduce notifications.

Name Change command

.name (arg1) (arg2) -> .name (target someone's user nickname) (text that will become target user's nickname).
Requires giving administrative privileges to bot.

Cant install Python3.6

Like it stands in the title. I somehow cant install Python3.6 it always installs Python3.7

Shadow voice messages

Allow users who aren't currently in a voice channel to have the bot send a voice message to users who are currently in a voice channel

Help command formatting

The default formatting of the help command reply could use some love. Additionally, the reply does not include the command's alias(es)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.