A simple NodeJS Discord bot using the Discord.js API
tarfeef101 25a75cfcc1 Merge branch 'fixes_shuffle_and_search' of tarfeef101/viki into master | 3 vuotta sitten | |
---|---|---|
src | 3 vuotta sitten | |
.gitignore | 3 vuotta sitten | |
Dockerfile | 3 vuotta sitten | |
README.md | 3 vuotta sitten | |
config.json | 6 vuotta sitten | |
docker-compose.yaml | 3 vuotta sitten |
Viki is a bot focused mainly on music streaming. Specifically, streaming from a beets
music library on the docker host on which the viki
container is run. Yes, this is a very specific, narrow use case.
To get this running on your server, other than the normal creation of a bot user stuff on the discord, side, do the following:
src/config.json
and add:
"token"
, your bot's token"prefix"
, the character that is the prefix for bot commands in your server"whitelist"
, an array of users in the form username#tag
who can run addmusic
for your botdocker-compose.yaml
:
beets
config and media folder(s)Dockerfile
:
uid
and gid
of this user to match the host, if necessarybeets
to be installed is equal or at least compatible with the host'sdocker-compose up --build -d
to run the botThe bot recognizes commands sent by non-bot users, prepended with the prefix
character set in the config.json
. Below is a list of commands the bot recognizes.
ping
!ping
join channelname
channelname
!join General
leave channelname
channelname
!leave General
price type weapon
weapon
of mod type type
, where type
is either rolled
or unrolled
!price unrolled kuva bramma
search querytype querystring
querytypes
include ['track', 'title', 'song', 'artist', 'album']
querystring
is the actual query, so if querytype
was artist
, a valid querystring
would be green day
addmusic querytype querystring
search
stop
next
previous
playlist
pause
resume
repeat setting
off
, one
, or all
. The default behaviour of the bot is off
skip
back
shuffle
addmusic
. so that's great