diff options
Diffstat (limited to 'src/plugins/usrbg/index.tsx')
-rw-r--r-- | src/plugins/usrbg/index.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/usrbg/index.tsx b/src/plugins/usrbg/index.tsx index cdb7260..0121d10 100644 --- a/src/plugins/usrbg/index.tsx +++ b/src/plugins/usrbg/index.tsx @@ -47,8 +47,8 @@ const settings = definePluginSettings({ export default definePlugin({ name: "USRBG", - description: "USRBG is a community maintained database of Discord banners, allowing anyone to get a banner without requiring Nitro", - authors: [Devs.AutumnVN, Devs.pylix], + description: "Displays user banners from USRBG, allowing anyone to get a banner without Nitro", + authors: [Devs.AutumnVN, Devs.pylix, Devs.TheKodeToad], settings, patches: [ { @@ -61,6 +61,10 @@ export default definePlugin({ { match: /(\i)\.bannerSrc,/, replace: "$self.useBannerHook($1)," + }, + { + match: /\?\(0,\i\.jsx\)\(\i,{type:\i,shown/, + replace: "&&$self.shouldShowBadge(arguments[0])$&" } ] }, @@ -104,6 +108,10 @@ export default definePlugin({ if (data[userId]) return 2; }, + shouldShowBadge({ displayProfile, user }: any) { + return displayProfile?.banner && (!data[user.id] || settings.store.nitroFirst); + }, + async start() { enableStyle(style); |