Plugin
ForceOwnerCrown
Force the owner crown next to usernames even if the server is large.
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { Devs } from "@utils/constants";8
import definePlugin from "@utils/types";9
import { Channel, User } from "@vencord/discord-types";10
import { GuildStore } from "@webpack/common";11
12
export default definePlugin({13
name: "ForceOwnerCrown",14
description: "Force the owner crown next to usernames even if the server is large.",15
authors: [Devs.D3SOX, Devs.Nickyux],16
tags: ["Roles", "Appearance", "Servers"],17
patches: [18
{19
find: "#{intl::GUILD_OWNER}),children:",20
replacement: {21
match: /(?<=decorators:.{0,200}?isOwner:)\i/,22
replace: "$self.isGuildOwner(arguments[0])"23
}24
}25
],26
isGuildOwner(props: { user: User, channel: Channel, isOwner: boolean, guildId?: string; }) {27
if (!props?.user?.id) return props.isOwner;28
if (props.channel?.type === 3 /* GROUP_DM */)29
return props.isOwner;30
31
// guild id is in props twice, fallback if the first is undefined32
const guildId = props.guildId ?? props.channel?.guild_id;33
const userId = props.user.id;34
35
return GuildStore.getGuild(guildId)?.ownerId === userId;36
},37
});38