diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/moyai.ts | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/plugins/moyai.ts b/src/plugins/moyai.ts index 581f960..66cd68c 100644 --- a/src/plugins/moyai.ts +++ b/src/plugins/moyai.ts @@ -1,8 +1,11 @@ -import definePlugin from "../utils/types"; -import { Devs } from "../utils/constants"; import { Message, ReactionEmoji } from "discord-types/general"; -import { FluxDispatcher, SelectedChannelStore } from "../webpack/common"; + +import { makeRange } from "../components/PluginSettings/components/SettingSliderComponent"; +import { Devs } from "../utils/constants"; import { sleep } from "../utils/misc"; +import definePlugin, { OptionType } from "../utils/types"; +import { Settings } from "../Vencord"; +import { FluxDispatcher, SelectedChannelStore } from "../webpack/common"; interface IMessageCreate { type: "MESSAGE_CREATE"; @@ -67,6 +70,16 @@ export default definePlugin({ FluxDispatcher.unsubscribe("MESSAGE_CREATE", this.onMessage); FluxDispatcher.unsubscribe("MESSAGE_REACTION_ADD", this.onReaction); }, + + options: { + volume: { + description: "Volume of the 🗿🗿🗿", + type: OptionType.SLIDER, + markers: makeRange(0, 1, 0.1), + default: 0.5, + stickToMarkers: false, + } + } }); function countOccurrences(sourceString: string, subString: string) { @@ -101,5 +114,6 @@ function getMoyaiCount(message: string) { function boom() { const audioElement = document.createElement("audio"); audioElement.src = MOYAI_URL; + audioElement.volume = Settings.plugins.Moyai.volume; audioElement.play(); } |