From c8d87da62d752cf7f0a40f70ae141d7ea69a9adc Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 15 Oct 2022 19:07:44 +0200 Subject: fart: lazy Audio, moyai: fix cors issues --- src/plugins/fart.ts | 9 +++++---- src/plugins/moyai.ts | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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" }; diff --git a/src/plugins/moyai.ts b/src/plugins/moyai.ts index 6b77a4e..581f960 100644 --- a/src/plugins/moyai.ts +++ b/src/plugins/moyai.ts @@ -23,7 +23,7 @@ interface IReactionAdd { const MOYAI = "🗿"; const MOYAI_URL = - "https://github.com/MeguminSama/VencordPlugins/raw/main/plugins/moyai/moyai.mp3"; + "https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3"; // Implement once Settings are a thing const ignoreBots = true; -- cgit