aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/fart.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-15 19:07:44 +0200
committerVendicated <vendicated@riseup.net>2022-10-15 19:07:44 +0200
commitc8d87da62d752cf7f0a40f70ae141d7ea69a9adc (patch)
tree2fc969d537eccb2822e0d0996fcaad811ab3608e /src/plugins/fart.ts
parent0d996633f201b2ab95d8b9dc376a7da2dcca315d (diff)
downloadVencord-c8d87da62d752cf7f0a40f70ae141d7ea69a9adc.tar.gz
Vencord-c8d87da62d752cf7f0a40f70ae141d7ea69a9adc.tar.bz2
Vencord-c8d87da62d752cf7f0a40f70ae141d7ea69a9adc.zip
fart: lazy Audio, moyai: fix cors issues
Diffstat (limited to 'src/plugins/fart.ts')
-rw-r--r--src/plugins/fart.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/fart.ts b/src/plugins/fart.ts
index 7c4b433..872977d 100644
--- a/src/plugins/fart.ts
+++ b/src/plugins/fart.ts
@@ -1,8 +1,7 @@
import { ApplicationCommandOptionType } from "../api/Commands";
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";
-
-const sound = { fart: new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3") };
+import { makeLazy } from "../utils/misc";
export default definePlugin({
name: "Fart2",
@@ -22,8 +21,10 @@ export default definePlugin({
],
execute(args) {
- sound.fart.volume = 0.3;
- sound.fart.play();
+ const fart = new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3");
+ fart.volume = 0.3;
+ fart.play();
+
return {
content: (args[0]) ? `<@${args[0].value}> fart` : "fart"
};