From f81ab5ef93459baf0a45eec1264412144dc4a18c Mon Sep 17 00:00:00 2001 From: Animal <24845294+ItzOnlyAnimal@users.noreply.github.com> Date: Wed, 19 Oct 2022 17:28:02 -0400 Subject: Add volume settings to fart plugin (#113) Co-authored-by: Ven --- src/plugins/fart.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/plugins/fart.ts') diff --git a/src/plugins/fart.ts b/src/plugins/fart.ts index 872977d..7a40afa 100644 --- a/src/plugins/fart.ts +++ b/src/plugins/fart.ts @@ -1,7 +1,8 @@ import { ApplicationCommandOptionType } from "../api/Commands"; +import { makeRange } from "../components/PluginSettings/components"; import { Devs } from "../utils/constants"; -import definePlugin from "../utils/types"; -import { makeLazy } from "../utils/misc"; +import definePlugin, { OptionType } from "../utils/types"; +import { Settings } from "../Vencord"; export default definePlugin({ name: "Fart2", @@ -22,12 +23,21 @@ export default definePlugin({ execute(args) { const fart = new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3"); - fart.volume = 0.3; + fart.volume = Settings.plugins.Fart2.volume; fart.play(); return { content: (args[0]) ? `<@${args[0].value}> fart` : "fart" }; }, - }] + }], + options: { + volume: { + description: "how loud you wanna fart (aka volume)", + type: OptionType.SLIDER, + markers: makeRange(0, 1, 0.1), + default: 0.5, + stickToMarkers: false, + } + } }); -- cgit