chore: init
This commit is contained in:
35
bestPluginEVER/components/IdiotWarning.tsx
Normal file
35
bestPluginEVER/components/IdiotWarning.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { Text } from "@webpack/common";
|
||||
|
||||
export const IDIOT_REGEX: RegExp[] = [
|
||||
/\b((s+i+x+ s+e+v+e+n+)|(67))\b/i,
|
||||
/skibidi ?(toilets?)?/i,
|
||||
/united kingdom/i,
|
||||
/hitler/i,
|
||||
/we ?are ?charlie ?kirk/i,
|
||||
/darktru/i
|
||||
];
|
||||
|
||||
export function IdiotWarning({
|
||||
message,
|
||||
}: {
|
||||
message: Message;
|
||||
}) {
|
||||
for (const idiot of IDIOT_REGEX) {
|
||||
if (idiot.test(message.content)) {
|
||||
return (
|
||||
<div>
|
||||
<Text color="text-danger" variant="text-xs/semibold">
|
||||
⚠️ This message is stupid.
|
||||
</Text>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
30
bestPluginEVER/components/VeryCool.tsx
Normal file
30
bestPluginEVER/components/VeryCool.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Button } from "@components/Button";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
export const COOL_REGEX: RegExp[] = [
|
||||
/vencord/i,
|
||||
];
|
||||
|
||||
export function VeryCool({
|
||||
message,
|
||||
}: {
|
||||
message: Message;
|
||||
}) {
|
||||
for (const idiot of COOL_REGEX) {
|
||||
if (idiot.test(message.content)) {
|
||||
return (
|
||||
<div>
|
||||
<Button type="button" variant="link" onClick={a => open("roblox://")}>
|
||||
secret :3
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
50
bestPluginEVER/index.tsx
Normal file
50
bestPluginEVER/index.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { addMessageAccessory, removeMessageAccessory } from "@api/MessageAccessories";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
import { IdiotWarning } from "./components/IdiotWarning";
|
||||
import { VeryCool } from "./components/VeryCool";
|
||||
|
||||
function BigWarning({
|
||||
message
|
||||
}: {
|
||||
message: Message;
|
||||
}) {
|
||||
return <>
|
||||
<IdiotWarning message={message} />
|
||||
<VeryCool message={message} />
|
||||
</>;
|
||||
}
|
||||
|
||||
export default definePlugin({
|
||||
name: "BestPluginEver",
|
||||
description: "Haha funny",
|
||||
authors: [{
|
||||
name: "ocbwoy3",
|
||||
id: 486147449703104523n
|
||||
}],
|
||||
|
||||
start() {
|
||||
addMessageAccessory(
|
||||
"BigWarning",
|
||||
(props: Record<string, any>) => {
|
||||
return (
|
||||
<BigWarning
|
||||
message={props.message as Message}
|
||||
/>
|
||||
);
|
||||
},
|
||||
4
|
||||
);
|
||||
},
|
||||
|
||||
stop() {
|
||||
removeMessageAccessory("BigWarning");
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user