Add string customization and example.env

This commit is contained in:
2021-05-02 18:26:18 +02:00
parent cbb4a6898b
commit cd51b092fc
13 changed files with 65 additions and 12 deletions

View File

@@ -1,3 +1,4 @@
const printf=require('printf');
const AudioQueue=require('../../AudioQueue.js')
module.exports = function (bot, api) {
@@ -20,9 +21,9 @@ module.exports = function (bot, api) {
let username = newState.member.displayName;
let str = "";
if (!joined) {
str = username + " left the channel";
str = printf(api.strings.USER_LEFT, username);
} else {
str = username + " joined the channel";
str = printf(api.strings.USER_JOINED, username);
}
api.queue.add(__dirname + "/sysmsg.wav");
api.speak(channel, str);