Plugin

IgnoreTerms

Ignore Discord's new terms of service

index.ts
Download

Source

src/plugins/ignoreTerms/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 { Devs } from "@utils/constants";
8import definePlugin from "@utils/types";
9
10export default definePlugin({
11 name: "IgnoreTerms",
12 description: "Ignore Discord's new terms of service",
13 authors: [Devs.FiveCord],
14 patches: [
15 {
16 find: "Messages.NEW_TERMS_TITLE",
17 replacement: {
18 match: /function (\i)\((\i)\)\{let\{transitionState:(\i)\}=(\i)/g,
19 replace: "function $1($2){return $self.closeModal($2);let{transitionState:$3}=$4"
20 }
21 }
22 ],
23
24 closeModal(event) {
25 event.transitionState = null;
26 event.onClose();
27 return null;
28 }
29});
30