rl404 / naka-kai

Discord bot to play youtube song.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Naka-Kai

Naka-Kai is a discord bot to play song from YouTube. Successor of my Naka.

Naka's name is taken from japanese cuiser. Also, exists in Kantai Collection games and anime as a fleet's idol. To live up its name, this bot will 'sing' for you like an idol.

Features

  • Play song from youtube url.
  • Search song from youtube.
  • Song queue system.
    • Pause song.
    • Resume song.
    • Stop song.
    • Next song.
    • Previous song.
    • Skip/jump to specific song in queue.
    • Remove 1 or more song from queue.
    • Delete queue.

Requirement

Steps

  1. Git clone this repo.
git clone github.com/rl404/naka
  1. Rename .env.sample to .env and modify according to your configuration.
Env Default Description
NAKA_KAI_DISCORD_TOKEN Discord bot token
NAKA_KAI_DISCORD_DELETE_TIME 0 Interval to auto delete discord message (in seconds). 0 to disable.
NAKA_KAI_DISCORD_QUEUE_LIMIT 20 Song queue count limit
NAKA_KAI_DB_DIALECT mysql Database dialect (mysql/postgresql)
NAKA_KAI_DB_ADDRESS localhost:3306 Database address
NAKA_KAI_DB_NAME naka-kai Database name
NAKA_KAI_DB_USER root Database username
NAKA_KAI_DB_PASSWORD Database password
NAKA_KAI_DB_MAX_CONN_OPEN 10 Database max open connection
NAKA_KAI_DB_MAX_CONN_IDLE 10 Database max idle connection
NAKA_KAI_DB_MAX_CONN_LIFETIME 1m Database max connection lifetime
NAKA_KAI_YOUTUBE_KEY YouTube API key
  1. Migrate the database.
make migrate

# or using docker
make docker-migrate
  1. Run the bot.
make

# or using docker
make docker
# to stop docker
make docker-stop
  1. Invite the bot to your server.
  2. Join a voice channel.
  3. Try /play https://www.youtube.com/watch?v=dQw4w9WgXcQ from the bot's slash command.
  4. Have fun.

License

MIT License

Copyright (c) 2024 Axel

About

Discord bot to play youtube song.

License:MIT License


Languages

Language:Go 91.1%Language:HCL 6.2%Language:Makefile 2.3%Language:Dockerfile 0.4%