diff options
author | Nickyux <30734036+nmsturcke@users.noreply.github.com> | 2022-11-01 02:19:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 02:19:07 +0100 |
commit | 1944f3957fb8113b610a4e281d75ee36ac97a422 (patch) | |
tree | 72e7204cb79cad1a23fbe5e71e6573053b5222be | |
parent | 04d6f341ee3122e36044739d533a69e4312dd116 (diff) | |
download | Vencord-1944f3957fb8113b610a4e281d75ee36ac97a422.tar.gz Vencord-1944f3957fb8113b610a4e281d75ee36ac97a422.tar.bz2 Vencord-1944f3957fb8113b610a4e281d75ee36ac97a422.zip |
fix forceOwnerCrown Plugin Spamming Errors in Console (#180)
Co-authored-by: Nico <nico@d3sox.me>
Co-authored-by: Ven <vendicated@riseup.net>
-rw-r--r-- | src/plugins/experiments.tsx | 2 | ||||
-rw-r--r-- | src/plugins/forceOwnerCrown.ts | 7 | ||||
-rw-r--r-- | src/utils/constants.ts | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/plugins/experiments.tsx b/src/plugins/experiments.tsx index eac5b48..b9df6f9 100644 --- a/src/plugins/experiments.tsx +++ b/src/plugins/experiments.tsx @@ -30,7 +30,7 @@ export default definePlugin({ authors: [ Devs.Megu, Devs.Ven, - { name: "Nickyux", id: 427146305651998721n }, + Devs.Nickyux, { name: "BanTheNons", id: 460478012794863637n }, ], description: "Enable Access to Experiments in Discord!", diff --git a/src/plugins/forceOwnerCrown.ts b/src/plugins/forceOwnerCrown.ts index b942d9a..a26e6e2 100644 --- a/src/plugins/forceOwnerCrown.ts +++ b/src/plugins/forceOwnerCrown.ts @@ -26,7 +26,7 @@ waitFor(["getGuild"], m => GuildStore = m); export default definePlugin({ name: "ForceOwnerCrown", description: "Force the owner crown next to usernames even if the server is large.", - authors: [Devs.D3SOX], + authors: [Devs.D3SOX, Devs.Nickyux], patches: [ { // This is the logic where it decides whether to render the owner crown or not @@ -38,6 +38,11 @@ export default definePlugin({ }, ], isGuildOwner(props) { + // Check if channel is a Group DM, if so return false + if (props?.channel?.type === 3) { + return false; + } + // guild id is in props twice, fallback if the first is undefined const guildId = props?.guildId ?? props?.channel?.guild_id; const userId = props?.user?.id; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 30cf4dc..caf9063 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -88,5 +88,9 @@ export const Devs = Object.freeze({ D3SOX: { name: "D3SOX", id: 201052085641281538n + }, + Nickyux: { + name: "Nickyux", + id: 427146305651998721n } }); |