mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-28 07:54:22 -04:00
More Plugins
This commit is contained in:
parent
5eefc88ec2
commit
0d9457e1bc
39 changed files with 3648 additions and 2 deletions
29
src/equicordplugins/noBulletPoints/index.tsx
Normal file
29
src/equicordplugins/noBulletPoints/index.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { addPreSendListener, removePreSendListener } from "@api/MessageEvents";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
export default definePlugin({
|
||||
name: "NoBulletPoints",
|
||||
description: "Stops you from typing markdown bullet points (stinky)",
|
||||
authors: [Devs.Samwich],
|
||||
dependencies: ["MessageEventsAPI"],
|
||||
start() {
|
||||
this.preSend = addPreSendListener((channelId, msg) => {
|
||||
msg.content = textProcessing(msg.content);
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
this.preSend = removePreSendListener((channelId, msg) => {
|
||||
msg.content = textProcessing(msg.content);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
function textProcessing(text: string): string {
|
||||
return text.replace(/- /g, "\\- ");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue