FredBoat

From Omnia
Jump to navigation Jump to search

Ukulele

See Discord/Ukulele

Self Hosting

https://fredboat.com/docs/selfhosting

Tutorial:

https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token

Discord Applications:

https://discord.com/developers/applications

Add to Server:

https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=0

Setup FredBoat

Guide

https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token

Setup Application

https://discord.com/developers/applications

Setup Application:

  • New Application
  • Get Client ID - needed for URL
  • Bot
  • Add Bot
  • Recommend deselecting "Public Bot"
  • Click to Reveal Token - copy to common.yml
  • Bot Permissions - Voice Permissions - Connect "1048576"

Setup Linux Bot (Ubuntu 18)

apt install docker docker-compose
git clone https://github.com/Frederikam/FredBoat
cp -avp FredBoat/config/templates Bot
cd Bot
mv docker-compose.yml docker-compose.yml.original
#cp selfhosting.yml docker-compose.yml
ln -s selfhosting.yml docker-compose.yml
# edit common.yml
   discordToken: "[Bot Token]"

Note: "Bot Token" is not the App Secret Token. Look under the Bot section.

If you want to be able to play "local" server music, or direct HTTP music, edit fredboat.yml:

  #enableLocal:       false        # Set to true to enable playing local files
  enableHttp:        true        # Set to true to enable playing direct links
  #enableLocal:       false        # Set to true to enable playing local files
  enableHttp:        true        # Set to true to enable playing direct links

A few other changes in fredboat.yml:

config:
  #development:       true         # Set this to false for selfhosting. If you leave this enabled and complain about weird
  development:       false         # Set this to false for selfhosting. If you leave this enabled and complain about weird
                                  # things happening to your bot in the selfhosting chat you will be publicly taunted.

  #prefix:            '<<'         # Default prefix used by the bot
  prefix:            ';'         # Default prefix used by the bot

  #game:              ""           # Set the displayed game/status. Leave empty quote marks for the default status
  game:              "Music Bot"           # Set the displayed game/status. Leave empty quote marks for the default status

Managing docker

# start FredBoat (and build docker first time):
docker-compose up -d
# show running processes
docker ps
# show all processes, including stopped
docker ps -a
# show logs and follow:
docker-compose logs -f
# stop server:
docker-compose stop
# update docker images:
docker-compose pull

Join bot to server with this link:

https://discordapp.com/oauth2/authorize?scope=bot&permissions=1048576&client_id=YOUR_CLIENT_ID_HERE
#eg. https://discordapp.com/oauth2/authorize?scope=bot&permissions=0&client_id=123456789
# permissions=0 is none, permissions=1048576 is voice connect

Debug

Bring one service up at a time...

Start in the following order DB>Quarterdeck>sentinel>everything else


docker-compose up -d db
docker-compose logs -f
docker-compose up -d quarterdeck
docker-compose up -d sentinel
docker-compose up -d

quarterdeck pass

### This is not needed, the default blank seems to figure it out ###

quarterdeck.yml

security:
  admins:
  # Set a name and a pass. These have to be the same as set up in the fredboat.yaml
  # Do not leave any of them blank or empty.
  - name: "docker"
    pass: "docker"

Clear Docker Data

Otter05/30/2018
Alright. Nuke the install completely.
Gabriel boy made a script to do it.
If you have no other docker containers/images that you need on the machine you can run the following commands to nuke all of the sticky docker data related to fredboat.

 rm -rf postgres-data/ quarterdeck_logs/ music_persistence/ fredboat_logs/ && docker rm $(docker ps -aq) && docker system prune --all

Or rather a single line command.
Also increase the memory limit on QD

ref: [1]

Issues

Old Bot Not Playing Many Youtube Music

<<play https://www.youtube.com/watch?v=m_8QMAChwtg

Music Bot
BOT
Today at 6:43 PM
RPG Music | Dungeons & Dragons Music & Gaming Music will now play.
Something went wrong!
Track RPG Music \| Dungeons & Dragons Music & Gaming Music failed to load. Skipping...

Upgrade the docker images.

docker-compose stop
docker-compose pull
docker-compose up -d

keywords