Discord-bot-go is a simple music bot for Discord built in Go, using discordgo.
It plays music from youtube with using yt-dlp.
Command Name | Parameter | Description |
---|---|---|
-play | Search String or Youtube URL | If given parameter is a search string, it searches the string on Youtube and starts to play first found song. If given parameter is Youtube URL, then it starts to play the playlist through the first song |
-search | Search String or Youtube URL | It searches the given text or URL on youtube. Then shows first 10 results. |
-showq | - | It shows the play queue(Max queue size : 50) |
-skip | - | Plays the next song from play queue. |
-stop | - | Stops playing songs and clears play queue. |
-help | - | Gives brief explanation about commands. |
- this opus library and its dependencies to play audio
- Ffmpeg
- yt-dlp to play song from youtube
# Install discord-bot-go
go get -u github.com/puristt/discord-bot-go
- discord-bot-go loads necessary tokens from ".env" file. You must create ".env" file like below :
Youtube_ApiKey={Your_Youtube_Token}
Discord_Token={Your_Discord_Token}
- Then you can run the go run command
go run main.go
# Docker build command
# Do not forget to create .env file
docker build -t discord-bot-go .
# Docker run command
docker run -d -it otobot
- Spotify support can be added.