Code Monkey home page Code Monkey logo

thebard-discordbot's Introduction

thebard-discordbot

Discord bot for RPG Game Masters

Commands

List of available commands: wushu

  • /r initiative to roll 1D20 for initiative

  • /r <atk> <def> to roll D6 for attack and D6 for defense

  • /r quick to roll a quick success test

  • !sing to invite the bot in your current vocal channel, and start streaming from config.iceCastUrl in your config/base.json

Installation

You will need to install icecast + darkice (Linux) or butt (Windows) to stream audio from your computer to the bot.

Rename config/base.demo.json to config/base.json

Icecast stream server

First, you need a way to diffuse audio with icecast

sudo apt-get install icecast2

Edit icecast config /etc/icecast2/icecast.xml and set user/password

<authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>your-password</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>your-password</relay-password>
 
        <!-- Admin logs in with the username given below -->
        <admin-user>admin</admin-user>
        <admin-password>password</admin-password>
</authentication>

Restart icecast2 with new config

sudo /etc/init.d/icecast2 stop && sudo /etc/init.d/icecast2 start

DarkIce to stream desktop audio to the Stream Server

sudo apt-get install darkice

You can edit the darkice config file in config/darkice.cfg to suit you icecast config

Launch DarkIce to redirect your local audio to the stream server

darkice -c /path/to/darkice.cfg

If you go to icecast admin page you should see thebard.ogg mountpoint ready to play

Fill the config/base.json iceCastUrl section to match your server setup

Setup the discord Bot

Go to Discord developers portal and create a new application.

Copy the CLIENT ID to your config/base.json file

Click on it, and go to the bot tab to create the bot

Add a bot

Check the bot token and click to reveal

Bot token

Copy the secret token to your config/base.json file

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.