mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
Add workaround for guild role api changes on canary/ptb
fixes RoleColorEverywhere, ServerInfo, PermissionViewer, BetterRoleContext
This commit is contained in:
parent
497f0de9a1
commit
34390e0365
8 changed files with 35 additions and 18 deletions
|
@ -21,6 +21,7 @@ import "./styles.css";
|
|||
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { getGuildRoles } from "@utils/discord";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { ChannelStore, GuildMemberStore, GuildStore, Menu, PermissionsBits, UserStore } from "@webpack/common";
|
||||
import type { Guild, GuildMember } from "discord-types/general";
|
||||
|
@ -107,7 +108,7 @@ function MenuItem(guildId: string, id?: string, type?: MenuItemParentType) {
|
|||
}
|
||||
|
||||
default: {
|
||||
permissions = Object.values(guild.roles).map(role => ({
|
||||
permissions = Object.values(getGuildRoles(guild.id)).map(role => ({
|
||||
type: PermissionType.Role,
|
||||
...role
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue