Skip to content

Instantly share code, notes, and snippets.

@Froghut
Created July 27, 2021 10:07
Show Gist options
  • Save Froghut/9df812b986f8264536a6e6900ef93d06 to your computer and use it in GitHub Desktop.
Save Froghut/9df812b986f8264536a6e6900ef93d06 to your computer and use it in GitHub Desktop.
VoiceModeAnnounce plugin for BetterDiscord
/**
* @name VoiceModeAnnounce
* @author Froghut
* @description Will audio announce whenever the vioce mode changes.
* @version 1.0.0
* @source https://gist.github.com/rauenzi/9df812b986f8264536a6e6900ef93d06
*/
var ptt = "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjQ1LjEwMAAAAAAAAAAAAAAA//NgxAAea9XgAUUYAQADjCYfA4fD5yN/85znOiJ//8RELcIAAAAAAAhBAGLdz/R3P/0d3d3dwMAAAAAEIiI7u7u7uAACJ1/3d3f////0RC0R3d3P//d3dwAAREL/iJ133f//Qvd3934gQQmiIiIm4AACC/9E/93REREL//67iEAABwYAADoC0EBYxk9pBwPR1Ggg4Pc5cLhoDaYX//NixBUjjBZsAZKIANxcHMy+4HaFvY5noIIG4CjFxjiC4P+ghDAYyYWRh85E/5gyZcNGciYr4uNAgZEyIf/rdSCCajImCokTBFDxp//f/bkMNEUJEy/J8n1GZN//+6H63/TWbpou5ogonGY4XEP///+2+3+YIIG6mM00jczWmUS+mZl9BZvVqQQAQgQWRlqAYILep2zZehatMMBdl//zYsQWJWNWoZWPaADkPcdLLNFkRzEpHFl01HaCWNECRL50cYtxGB7C4JyYIsUCgiZmBHHEYG5ko+ZqqLxxVEzJkumTui6mUy0kDh7MWNjFbzNLazUTGtT9VA6pA+fUbzB0UKbUVt+6WynRpdzqnRejRZmuig116rN6lK36rX//0EDqjQiDfxlC1N2+peIJ2awO8vw6ZeKctOiEXwf/82LEECAyBpTX2lgA9VnMCBSvtzsojF77kw+k7qalerChgBI1E1AUeCQCGT2wxiznIsRO0nDrplV8v/t9w9KHnrRr///ndxLXe90Ot/+canWxn9fy+3vYhgigAKD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yRrqoUJqoe/9I8iPIAoaosPIgVsqsrP0LMLCQGAUMAYqGD5DkMrlb/dUfRACBixEVrAY4dY3lrM6lo/RymUOssBAysFZ0q7h3hIKuqAumVcHTpGGvlXA0SPZXoYlQEgbhUPiUuvmHo4VKEESkPV8wNlL9pS//9llLVuFKFhBEhZjparEo6HISIsdURsGkJEQjL/82LENB/LHdwAQkeBURiB12tJqTKhtSakdmZfL/+RqwOo5ZGoYE5fZZLL8sn+asFBk1JqRy5/82qGJDBQSGW1JgtV/YNDd//7EzeNKuii31JZm5SV/pVJKkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
var mode = "";
var interval;
var voiceSettings;
function Check() {
var curMode = voiceSettings.getMode();
if (curMode != mode) {
if (curMode == "PUSH_TO_TALK") {
play(ptt);
}
else {
play(voice);
}
mode = curMode;
}
}
function play(src) {
let audio = new Audio();
audio.src = src;
audio.play();
}
module.exports = class VoiceModeAnnounce {
load() {
voiceSettings = BdApi.findModuleByProps("getEchoCancellation");
}
start() {
mode = BdApi.findModuleByProps("getEchoCancellation").getMode();
interval = setInterval(Check, 500);
Check();
}
stop() {
clearInterval(interval);
}
observer(changes) {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment