Plugin

Hop On

Hop on Fortnite or Hop on bloons :3

index.tsx
Download

Source

src/plugins/hopOn/index.tsx
1/*
2 * FiveCord — a Discord client mod
3 * Copyright (c) 2025 FiveCord
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7import { definePluginSettings } from "@api/Settings";
8import { Devs } from "@utils/constants";
9import definePlugin, { OptionType } from "@utils/types";
10import { RelationshipStore, SelectedChannelStore } from "@webpack/common";
11import { Message } from "discord-types/general";
12
13interface IMessageCreate {
14 type: "MESSAGE_CREATE";
15 optimistic: boolean;
16 channelId: string;
17 message: Message;
18}
19
20const settings = definePluginSettings({
21 regex: {
22 type: OptionType.STRING,
23 description: "Regex to trigger on",
24 default: "hop on (?:fortnite|fn)"
25 },
26 url: {
27 type: OptionType.STRING,
28 description: "URL to open",
29 default: "com.epicgames.launcher:class="ts-cmt">//apps/fn%3A4fe75bbc5a674f4f9b356b5c90567da5%3AFortnite?action=launch&silent=true"
30 }
31});
32export default definePlugin({
33 name: "Hop On",
34 description: "Hop on Fortnite or Hop on bloons :3",
35 authors: [Devs.FiveCord],
36 settings,
37 flux: {
38 async MESSAGE_CREATE({ optimistic, type, message, channelId }: IMessageCreate) {
39 if (optimistic || type !== "MESSAGE_CREATE") return;
40 if (message.state === "SENDING") return;
41 if (RelationshipStore.isBlocked(message.author?.id)) return;
42 if (channelId !== SelectedChannelStore.getChannelId()) return;
43 if (!message.content?.match(new RegExp(settings.store.regex, "i"))) return;
44
45 VencordNative.native.openExternal(settings.store.url);
46 }
47 }
48});
49