aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-10-06 04:00:09 +0200
committerVendicated <vendicated@riseup.net>2023-10-06 04:00:09 +0200
commit5eb9dd04dff212686e3395752877ddf62c1f78e2 (patch)
tree84434118769736f7088d6e41c119acc03aea930e /src/api
parent03b5dc9c27250be09ae1a8c80842edf8cde642d9 (diff)
downloadVencord-5eb9dd04dff212686e3395752877ddf62c1f78e2.tar.gz
Vencord-5eb9dd04dff212686e3395752877ddf62c1f78e2.tar.bz2
Vencord-5eb9dd04dff212686e3395752877ddf62c1f78e2.zip
Fix member list decorations api
Diffstat (limited to 'src/api')
-rw-r--r--src/api/MemberListDecorators.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/MemberListDecorators.ts b/src/api/MemberListDecorators.ts
index fade2a7..e148bb0 100644
--- a/src/api/MemberListDecorators.ts
+++ b/src/api/MemberListDecorators.ts
@@ -20,7 +20,6 @@ import { Channel, User } from "discord-types/general/index.js";
interface DecoratorProps {
activities: any[];
- canUseAvatarDecorations: boolean;
channel: Channel;
/**
* Only for DM members
@@ -52,9 +51,9 @@ export function removeDecorator(identifier: string) {
decorators.delete(identifier);
}
-export function __addDecoratorsToList(props: DecoratorProps): (JSX.Element | null)[] {
+export function __getDecorators(props: DecoratorProps): (JSX.Element | null)[] {
const isInGuild = !!(props.guildId);
- return [...decorators.values()].map(decoratorObj => {
+ return Array.from(decorators.values(), decoratorObj => {
const { decorator, onlyIn } = decoratorObj;
// this can most likely be done cleaner
if (!onlyIn || (onlyIn === "guilds" && isInGuild) || (onlyIn === "dms" && !isInGuild)) {