aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegumin <megumin.bakaretsurie@gmail.com>2023-08-25 13:02:10 +0100
committerGitHub <noreply@github.com>2023-08-25 14:02:10 +0200
commit0f0282551d5e7c981f3a50660b1526fc6645f5a2 (patch)
treef6ebaf8eee6ac5d2b1ee2c625b8b907f0870876d /src
parent0335e1ca59df34d1e6f689a8adb70d0a1eaf085a (diff)
downloadVencord-0f0282551d5e7c981f3a50660b1526fc6645f5a2.tar.gz
Vencord-0f0282551d5e7c981f3a50660b1526fc6645f5a2.tar.bz2
Vencord-0f0282551d5e7c981f3a50660b1526fc6645f5a2.zip
🗿 but HD (#1678)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/moyai.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/moyai.ts b/src/plugins/moyai.ts
index b8d76da..649b1fb 100644
--- a/src/plugins/moyai.ts
+++ b/src/plugins/moyai.ts
@@ -54,6 +54,8 @@ interface IVoiceChannelEffectSendEvent {
const MOYAI = "🗿";
const MOYAI_URL =
"https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3";
+const MOYAI_URL_HD =
+ "https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav";
const settings = definePluginSettings({
volume: {
@@ -63,6 +65,14 @@ const settings = definePluginSettings({
default: 0.5,
stickToMarkers: false
},
+ quality: {
+ description: "Quality of the 🗿🗿🗿",
+ type: OptionType.SELECT,
+ options: [
+ { label: "Normal", value: "Normal", default: true },
+ { label: "HD", value: "HD" }
+ ],
+ },
triggerWhenUnfocused: {
description: "Trigger the 🗿 even when the window is unfocused",
type: OptionType.BOOLEAN,
@@ -157,7 +167,11 @@ function getMoyaiCount(message: string) {
function boom() {
if (!settings.store.triggerWhenUnfocused && !document.hasFocus()) return;
const audioElement = document.createElement("audio");
- audioElement.src = MOYAI_URL;
+
+ audioElement.src = settings.store.quality === "HD"
+ ? MOYAI_URL_HD
+ : MOYAI_URL;
+
audioElement.volume = settings.store.volume;
audioElement.play();
}