Equicord/src/plugins/_api/nicknameIcons.ts

24 lines
663 B
TypeScript
Raw Normal View History

2025-05-02 21:00:56 -04:00
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
export default definePlugin({
name: "NicknameIconsAPI",
description: "API to add icons to the nickname, in profiles",
authors: [Devs.Nuckyz],
patches: [
{
find: "#{intl::USER_PROFILE_LOAD_ERROR}",
replacement: {
match: /(\.fetchError.+?\?)null/,
replace: (_, rest) => `${rest}Vencord.Api.NicknameIcons._renderIcons(arguments[0])`
}
}
]
});