Fix ChatInputButtonAPI

This commit is contained in:
Nuckyz 2025-02-27 18:55:55 -03:00
parent ff82532a18
commit aab09ac249
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -17,7 +17,7 @@ export default definePlugin({
find: '"sticker")', find: '"sticker")',
replacement: { replacement: {
// FIXME(Bundler change related): Remove old compatiblity once enough time has passed // FIXME(Bundler change related): Remove old compatiblity once enough time has passed
match: /return\((!)?\i\.\i(?:\|\||&&)(?=\(\i\.isDM.+?(\i)\.push)/, match: /return\((!)?\i\.\i(?:\|\||&&)(?=\(.+?(\i)\.push)/,
replace: (m, not, children) => not replace: (m, not, children) => not
? `${m}(Vencord.Api.ChatButtons._injectButtons(${children},arguments[0]),true)&&` ? `${m}(Vencord.Api.ChatButtons._injectButtons(${children},arguments[0]),true)&&`
: `${m}(Vencord.Api.ChatButtons._injectButtons(${children},arguments[0]),false)||` : `${m}(Vencord.Api.ChatButtons._injectButtons(${children},arguments[0]),false)||`