Wanted to make some / switches for playing some embedded sound files in chat. However Pruning through the source, so far I'm not finding much.
I'm guessing its along the lines of this.
ajaxChat.replaceCustomCommands = function(text, textParts) {
switch(textParts[0]) {
case '/yeah!':
text=text.replace('/yeah!', ");
ajaxChat.playSound(soundError);
break;
}
}
obviously in config.js I'd need to define it like such
// Defines the sound that is played on error messages:
soundError: 'sound_6',
^ the above is already in there, and I'd add it below.
In loggedin.html
ajaxChat.fillSoundSelection('soundErrorSetting', ajaxChat.getSetting('soundError'));
I'm sure there are other places, however I'm trying to manually invoke it via command vs add it to the chat.
However still messing around with it. If anyone can lead me in the right direction I'd greatly appreciate it <3