|
|
@ -354,6 +354,15 @@ export default definePlugin({
|
|
|
|
if (location === "chat" && !settings.tagSettings[tag.name].showInChat) continue;
|
|
|
|
if (location === "chat" && !settings.tagSettings[tag.name].showInChat) continue;
|
|
|
|
if (location === "not-chat" && !settings.tagSettings[tag.name].showInNotChat) continue;
|
|
|
|
if (location === "not-chat" && !settings.tagSettings[tag.name].showInNotChat) continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// If the owner tag is disabled, and the user is the owner of the guild,
|
|
|
|
|
|
|
|
// avoid adding other tags because the owner will always match the condition for them
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
tag.name !== "OWNER" &&
|
|
|
|
|
|
|
|
GuildStore.getGuild(channel?.guild_id)?.ownerId === user.id &&
|
|
|
|
|
|
|
|
(location === "chat" && !settings.tagSettings.OWNER.showInChat) ||
|
|
|
|
|
|
|
|
(location === "not-chat" && !settings.tagSettings.OWNER.showInNotChat)
|
|
|
|
|
|
|
|
) continue;
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
tag.permissions?.some(perm => perms.includes(perm)) ||
|
|
|
|
tag.permissions?.some(perm => perms.includes(perm)) ||
|
|
|
|
(tag.condition?.(message!, user, channel))
|
|
|
|
(tag.condition?.(message!, user, channel))
|
|
|
|