add new plugin MoreQuickReactions (#3865)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
fcb8276a81
commit
3e036d1612
3 changed files with 49 additions and 0 deletions
7
src/plugins/moreQuickReactions/README.md
Normal file
7
src/plugins/moreQuickReactions/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# MoreQuickReactions
|
||||
|
||||
Increases the number of reactions available in the Quick React hover menu.
|
||||
|
||||
You can change the number of reactions shown in the plugin settings.
|
||||
|
||||

|
||||
38
src/plugins/moreQuickReactions/index.ts
Normal file
38
src/plugins/moreQuickReactions/index.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
reactionCount: {
|
||||
description: "Number of reactions (0-42)",
|
||||
type: OptionType.NUMBER,
|
||||
default: 5
|
||||
},
|
||||
});
|
||||
|
||||
export default definePlugin({
|
||||
name: "MoreQuickReactions",
|
||||
description: "Increases the number of reactions available in the Quick React hover menu",
|
||||
authors: [Devs.iamme],
|
||||
settings,
|
||||
|
||||
get reactionCount() {
|
||||
return settings.store.reactionCount;
|
||||
},
|
||||
|
||||
patches: [
|
||||
{
|
||||
find: "#{intl::MESSAGE_UTILITIES_A11Y_LABEL}",
|
||||
replacement: {
|
||||
match: /(?<=length>=3\?.{0,40})\.slice\(0,3\)/,
|
||||
replace: ".slice(0,$self.reactionCount)"
|
||||
}
|
||||
}
|
||||
],
|
||||
});
|
||||
|
|
@ -489,6 +489,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
|||
name: "Sqaaakoi",
|
||||
id: 259558259491340288n
|
||||
},
|
||||
iamme: {
|
||||
name: "i am me",
|
||||
id: 984392761929256980n
|
||||
},
|
||||
Byeoon: {
|
||||
name: "byeoon",
|
||||
id: 1167275288036655133n
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue