🗿 but HD (#1678)
This commit is contained in:
parent
0335e1ca59
commit
0f0282551d
1 changed files with 15 additions and 1 deletions
|
@ -54,6 +54,8 @@ interface IVoiceChannelEffectSendEvent {
|
||||||
const MOYAI = "🗿";
|
const MOYAI = "🗿";
|
||||||
const MOYAI_URL =
|
const MOYAI_URL =
|
||||||
"https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3";
|
"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({
|
const settings = definePluginSettings({
|
||||||
volume: {
|
volume: {
|
||||||
|
@ -63,6 +65,14 @@ const settings = definePluginSettings({
|
||||||
default: 0.5,
|
default: 0.5,
|
||||||
stickToMarkers: false
|
stickToMarkers: false
|
||||||
},
|
},
|
||||||
|
quality: {
|
||||||
|
description: "Quality of the 🗿🗿🗿",
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
options: [
|
||||||
|
{ label: "Normal", value: "Normal", default: true },
|
||||||
|
{ label: "HD", value: "HD" }
|
||||||
|
],
|
||||||
|
},
|
||||||
triggerWhenUnfocused: {
|
triggerWhenUnfocused: {
|
||||||
description: "Trigger the 🗿 even when the window is unfocused",
|
description: "Trigger the 🗿 even when the window is unfocused",
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
|
@ -157,7 +167,11 @@ function getMoyaiCount(message: string) {
|
||||||
function boom() {
|
function boom() {
|
||||||
if (!settings.store.triggerWhenUnfocused && !document.hasFocus()) return;
|
if (!settings.store.triggerWhenUnfocused && !document.hasFocus()) return;
|
||||||
const audioElement = document.createElement("audio");
|
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.volume = settings.store.volume;
|
||||||
audioElement.play();
|
audioElement.play();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue