Implement api.output, announcevoice command, a bunch of other tts shit, etc etc etc buh
This commit is contained in:
BIN
modules/.DS_Store
vendored
BIN
modules/.DS_Store
vendored
Binary file not shown.
18
modules/ttsSettings/index.js
Normal file
18
modules/ttsSettings/index.js
Normal file
@@ -0,0 +1,18 @@
|
||||
module.exports = function(bot, api) {
|
||||
api.registerCommand('announcevoice', (args, message) => {
|
||||
let channel = bot.voice.connections.first().channel;
|
||||
if(args.length>3) {
|
||||
return api.respond(message, "You tried to change my voice with too many arguments.");
|
||||
}
|
||||
if(api.ttsEngines[args[1]]) {
|
||||
api.announcementEngine=api.ttsEngines[args[1]];
|
||||
if(api.announcementEngine.validateVoice(args[2])) {
|
||||
api.announcementVoice=args[2];
|
||||
api.respond(message, "My new voice is "+api.announcementVoice+" from "+api.announcementEngine.longName);
|
||||
} else {
|
||||
api.announcementVoice=api.announcementEngine.getDefaultVoice();
|
||||
api.respond(message, "Your voice name was invalid, so I switched to the default voice ("+api.announcementVoice+") for "+api.announcementEngine.longName+" instead.");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
@@ -5,6 +5,6 @@ module.exports = function(bot, api) {
|
||||
const channel = await bot.channels.fetch(process.env.CHANNEL);
|
||||
await api.joinChannel(channel);
|
||||
|
||||
api.speak(channel, `Hi! I'm alive. It is now ${new Date().toLocaleTimeString()} on ${new Date().toLocaleDateString()}`,api.ttsEngines.espeak, "en");
|
||||
api.speak(channel, `Hey buddies! How does it feel like to be a buddy? Are you proud of being a buddy? Well that's great!'`);
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user