diff options
author | Ryan Cao <70191398+ryanccn@users.noreply.github.com> | 2023-04-07 08:31:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 00:31:21 +0000 |
commit | 2a0c30b66d9c49eca2c6c34f438dbfdfcd338f6e (patch) | |
tree | 98963d0b175afd96c55892bdfddb7e201ed8566c /src | |
parent | 97f8d4d5154d566568fc475d6aaba5db07399b2b (diff) | |
download | Vencord-2a0c30b66d9c49eca2c6c34f438dbfdfcd338f6e.tar.gz Vencord-2a0c30b66d9c49eca2c6c34f438dbfdfcd338f6e.tar.bz2 Vencord-2a0c30b66d9c49eca2c6c34f438dbfdfcd338f6e.zip |
feat(moreusertags): add option to not show more tags for bots (#812)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/moreUserTags.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/moreUserTags.ts b/src/plugins/moreUserTags.ts index ba2a9b7..c8420ff 100644 --- a/src/plugins/moreUserTags.ts +++ b/src/plugins/moreUserTags.ts @@ -83,6 +83,10 @@ const tags: Tag[] = [ ]; const settings = definePluginSettings({ + dontShowForBots: { + description: "Don't show tags (not including the webhook tag) for bots", + type: OptionType.BOOLEAN + }, dontShowBotTag: { description: "Don't show [BOT] text for bots with other tags (verified bots will still have checkmark)", type: OptionType.BOOLEAN @@ -214,6 +218,8 @@ return type!==null?$2.botTag,type" const [tagName, variant] = passedTagName.split("-"); const tag = tags.find(({ name }) => tagName === name); if (!tag) return "BOT"; + if (variant === "BOT" && tagName !== "WEBHOOK" && this.settings.store.dontShowForBots) return strings.BOT_TAG_BOT; + switch (variant) { case "OP": return `${strings.BOT_TAG_FORUM_ORIGINAL_POSTER} • ${tag.displayName}`; |