Seme4eg / sadbot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sad discord music bot

Discord bot that utilizes discordgo, gopus, yt-dlp and ffmpeg to stream music from host machine, YouTube, SoundCloud and other streaming platforms to user’s voice channel.

assets/queue.png

Right now my network capabilities are far below what’s needed to host this bot myself.

Usage

Create a config.yml, set your bot token there.

All commands below should be prefixed with prefix that is set in config.yml (default &).

  • help - Show help message.
  • p | play [<Title | URL>] - Resume paused playback. If <title | url> argument was given plays links from youtube & soundcloud.
  • pf | playfolder <path> - Play music from local folder (bot hoster only).
  • pause - Pause current playback.
  • stop - Stop current playback, clears queue.
  • next | skip - Skip to next song assuming there is one.
  • skipto <index> - Skip to song with <index> (look it up in queue) assuming there is one.
  • clear - Clear current queue.
  • leave - Leave the channel, clears queue, resets shuffle & repeat states.
  • repeat single/all/off - Repeat current track. Repeat all queue. Disable repeat.
  • loop - Same as repeat all.
  • (un)shuffle - (un)Shuffle the queue.
  • q | queue - Show current queue.
  • np - Show current track name.

Dependencies

  • ffmpeg
  • yt-dlp
  • cgo

Note: as a downloader in yt-dlp i am using ffmpeg, another option is to use aria2 but my aim was to keep this project minimal in terms of dependencies.

Todos

  • Reply f-n now deletes prev message always, even if it’s from prev session, which isn’t a big deal, but is an unobvious behaviour, subject for fix
  • maybe add some more options to config? like how many tracks to show in queue?
  • teach bot to leave after x time when no1 in voice
  • sharding and shards command to display info on shards status
  • duration output in queue
  • cleanup on interrupt, many goroutines report error from audio package
  • after interrupting (or queue end):
    • error nexting: either last song in the queue or no songs in it
    • Error streaming: either last song in the queue or no songs in it
  • should each song has it’s own ‘playback’ process in its struct? will it be easier to manage playback then?
  • commands:
    • ping command to show actual ping
    • stats command
    • radio Endless auto-generated radio based on selected genre.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%