- Install mongoDB, node.js (Recommend using nvm), yarn, ffmpeg and start the mongoDB Server
- Clone this repo
- Install dependencies with
yarn install
- Build with
yarn build:prod
- Run
node dist
the first time to generateconfig.json
- Create and grab your discord bot token, application ID, public key here
- Fill
config.json
- Install
pm2
vianpm install -g pm2
(Optional but recommended) - Start the bot with
node dist
orpm2 reload ecosystem.config.js
- When inviting bot to your server, be sure to enable these permission at least
- This bot uses slash command, type
/
in server chat and start configuring the bot - For the voice activity sound, put the following file into
asset/
folder:
<User ID>_join.wav --Connected to the channel
<User ID>_left.wav --Left the channel
<User ID>_switched_out.wav --Switched out from the channel
<User ID>_switched_in.wav --Switched into the channel
or place <User ID>.json
into asset/
folder with:
{
"lang": "<language from google translate>",
"join": "<Text when connected to the channel>",
"left": "<Text when left the channel>",
"switched_out": "<Text when switched out from the channel>",
"switched_in": "<Text when switched into to the channel>"
}
If you want to use the new google cloud text to speech, be sure to have apiKey in the config, and json content is:
{
"use_wave_tts":true,
"lang": "<language from google cloud>",
"voice": "<voice from google cloud>",
"join": "<Text when connected to the channel>",
"left": "<Text when left the channel>",
"switched_out": "<Text when switched out from the channel>",
"switched_in": "<Text when switched into to the channel>"
}
lang
and voice
available from https://cloud.google.com/text-to-speech/docs/voices
Example:
{
"lang": "en_US",
"join": "Jim joined the channel",
"left": "Jim left the channel",
"switched_out": "Jim switched out from the channel",
"switched_in": "Jim switched into the channel"
}
{
"use_wave_tts":true,
"lang": "en-GB",
"voice": "en-GB-Wavenet-B",
"join": "Jim joined the channel",
"left": "Jim left the channel",
"switched_out": "Jim switched out from the channel",
"switched_in": "Jim switched into the channel"
}