fart/index.ts
duke dennis 6aa03566b3
fix betterfart2
Signed-off-by: duke dennis <duke@splt.dev>
2024-11-16 20:55:34 +00:00

83 lines
3 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { ApplicationCommandOptionType } from "@api/Commands/types.js";
import { makeRange } from "@components/PluginSettings/components/SettingSliderComponent.jsx";
import definePlugin, { OptionType } from "@utils/types";
import { UserStore } from "@webpack/common";
import { Settings } from "../../Vencord.js";
export default definePlugin({
name: "fart",
description: "Fart Plugin Is Finally Here‼",
authors: [{
id: 728342296696979526n,
name: "splatter"
}],
commands: [
{
name: "fart",
description: "This command allows you to expel a toot or kindly request that a Discord™ user farts for you.",
options: [{
name: "user",
description: "The Discord™ user to request a toot from",
type: ApplicationCommandOptionType.USER,
required: false
}],
execute(args) {
const fart = new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3");
fart.volume = Settings.plugins.fart.volume;
fart.play();
return {
content: (args[0]) ? `<@${args[0].value}> fart` : "fart"
};
}
},
{
name: "betterfart2",
description: "A new and improved version of the old and inferior /betterfart command",
options: [{
name: "user",
description: "The Discord™ to kindly implore upon to send a fart your way",
type: ApplicationCommandOptionType.USER,
required: true
}],
execute(args) {
const fart = new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3");
fart.volume = Settings.plugins.fart.volume;
fart.play();
const user = UserStore.getCurrentUser();
return {
content: `My dear fellow Discord user <@${args[0].value}>,\n\nWould you be so kind as to, in due course, without interrupting or interfering with your normal duties, emit a toot in my general direction? I would greatly appreciate it.\n\nI look forward to a reply at your earliest convenience.\n\nKind regards,\n<@${user.id}>`
};
}
},
{
name: "venmybeloved",
description: "VEN HOW DO I GET FREE NITRO.",
execute() {
return {
content: "veeee 😭"
};
}
}
],
options: {
volume: {
description: "how putrid and loud your toot will be",
type: OptionType.SLIDER,
markers: makeRange(0, 1, 0.1),
default: 0.5,
stickToMarkers: false,
}
}
});