thischord

module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause

README

,--------.,--.     ,--.        ,-----.,--.                      ,--. 
'--.  .--'|  ,---. `--' ,---. '  .--./|  ,---.  ,---. ,--.--. ,-|  | 
   |  |   |  .-.  |,--.(  .-' |  |    |  .-.  || .-. ||  .--'' .-. | 
   |  |   |  | |  ||  |.-'  `)'  '--'\|  | |  |' '-' '|  |   \ `-' | 
   `--'   `--' `--'`--'`----'  `-----'`--' `--' `---' `--'    `---'  

A Discord music bot hoping to act as a comparable replacement for jMusicBot, built with Go.

This is meant to be self-hosted and can support 1 guild per instance.

Summary

  1. Prerequisites
  2. Features
  3. Missing Features
  4. Planned Additions
  5. Making a Discord Application
    1. General Information
    2. Installation
    3. Bot
  6. Getting Started with Lavalink
    1. Installing Lavalink
    2. Setting up Lavalink as a Service
    3. Configuring Lavalink
  7. Getting Started with ThisChord
    1. Installing ThisChord
    2. Setting up ThisChord as a Service
    3. Configuring ThisChord
  8. Starting the Music Bot

Prerequisites

Features

  • Search for music on YouTube
  • Play music from YouTube by search query or URI
  • Add additional songs into a queue
  • Skip songs
  • Shuffle the queue
  • Clear the queue
  • See what's playing, and the position of the seeker
  • Stop & pause playback

Missing Features

  • Ability to repeat:
    • tracks
    • queues
  • Loading playlists from YouTube
  • Additional music sources:
    • SoundCloud
    • Bandcamp
    • Vimeo
    • Premium services like:
      • Spotify
      • Apple Music
      • Deezer

Planned Additions

  • YAML or JSON config instead of using .env file
  • Ability to run w/ Docker
  • CI/CD integration
  • Return custom embeds instead of plain old text responses:
    • Now Playing:
      • media control buttons
      • seeker progression
      • added by
      • art (cover/album art)
    • Searching
    • Skipping
    • etc.

Making a Discord Application

First, we want to navigate to the Discord Developer Portal and click New Application in the top right, then proceed with editing the following sections.

General Information

We don't really need to change anything here unless you decide to change the name of the application.

Installation

Check Guild Install only, and ensure the scope has applications.commands and bot in it, then add the following permissions:

  • Add Reactions
  • Connect
  • Embed Links
  • Priority Speaker
  • Read Message History
  • Request To Speak
  • Send Messages
  • Send Messages in Threads
  • Speak
  • Use Slash Commands
  • Use Voice Activity
  • View Channels

[!TIP] You'll use the URL found under Install Link to invite the bot to your server.

Bot

Here, give your bot an optional profile picture, and a username. Ensure the following are enabled:

  • Public Bot
  • Presence Intent
  • Server Members Intent

[!TIP] This is where you'll also get your bot token, under the Token section of this page.

Please follow the official Lavalink documentation here

Please follow the official Lavalink documentation on creating a systemd service here

Lavalink needs a bit of additional configuration before we can use it with YouTube. You'll want to create a file called application.yml in the directory with Lavalink.jar - I recommend copying the sample and changing the password to your liking.

Getting Started with ThisChord

Installing ThisChord

[!IMPORTANT] Please ensure you have Go 1.25.1+ on your machine; installation instructions can be found here

To install ThisChord, run the following in your terminal, which will output the binary file to $GOBIN

$ go install codeberg.org/eleina/thischord/cmd/thischord@latest

[!TIP] Either export GOBIN in your shell profile, or run go env -w GOBIN=/path/to/some/bin

Setting up ThisChord as a Service

Create a file in /etc/systemd/system named thischord.service with the following:

[Unit]
Description=ThisChord Music Bot
After=lavalink.service syslog.target network.target
Requires=lavalink.service

[Service]
User=BOT_USER # replace this with the user you run the bot as, i.e. bot
Group=BOT_GROUP # replace this with the user's group you run the bot as, i.e., bot
WorkingDirectory=/path/to/bin/with/bot # i.e. /home/bot
ExecStart=/path/to/bin/with/bot/thischord # i.e /home/bot/thischord
Restart=on-failure
RestartSec=5s


[Install]
WantedBy=multi-user.target

Configuring ThisChord

Navigate to $GOBIN, or wherever you placed the thischord binary, and create a .env file. I recommend copying the sample and filling it in with details specific to your instance and Discord guild.

Starting the Music Bot

[!IMPORTANT] Please ensure you have yt-dlp and ffmpeg installed before starting the bot.

You'll want to reload the systemctl daemon:

$ sudo systemctl daemon-reload

and then enable & start both the Lavalink and ThisChord services:

$ sudo systemctl enable --now lavalink.service
$ sudo systemctl enable --now thischord.service

Lastly, let's make sure things are running smoothly. Run the following commands to ensure everything started properly:

$ systemctl status lavalink.service
$ systemctl status thischord.service

That should be all! You now have a music bot for your server! Make sure to periodically check this repo for updates!

Directories

Path Synopsis
cmd
thischord command
internal
bot

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL