Plugin

Slap

Adds a command from the land before Discord.

index.ts
Download

Source

src/plugins/slap/index.ts
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { ApplicationCommandInputType, ApplicationCommandOptionType } from "@api/Commands";
8import { Devs } from "@utils/constants";
9import definePlugin from "@utils/types";
10import { UserStore } from "@webpack/common";
11
12export default definePlugin({
13 name: "Slap",
14 description: "Adds a command from the land before Discord.",
15 authors: [Devs.FiveCord],
16 commands: [{
17 inputType: ApplicationCommandInputType.BUILT_IN_TEXT,
18 name: "slap",
19 description: "Slap someone/something.",
20 options: [{
21 name: "victim",
22 description: "Thing to slap",
23 required: true,
24 type: ApplicationCommandOptionType.STRING,
25 }],
26 execute: async ([{ value: victim }], ctx) => {
27 return { content: `<@${UserStore.getCurrentUser().id}> slaps ${victim} around a bit with a large trout` };
28 }
29 }]
30});
31