Remove getGuildRoles

This commit is contained in:
Nuckyz 2024-03-12 20:18:44 -03:00
parent 6e363814d1
commit 6a7657de3f
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
10 changed files with 30 additions and 32 deletions

View file

@ -5,10 +5,10 @@
*/
import { Devs } from "@utils/constants";
import { getCurrentGuild, getGuildRoles } from "@utils/discord";
import { getCurrentGuild } from "@utils/discord";
import definePlugin from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Clipboard, Menu, PermissionStore, TextAndImagesSettingsStores } from "@webpack/common";
import { Clipboard, GuildStore, Menu, PermissionStore, TextAndImagesSettingsStores } from "@webpack/common";
const GuildSettingsActions = findByPropsLazy("open", "selectRole", "updateGuild");
@ -49,7 +49,7 @@ export default definePlugin({
const guild = getCurrentGuild();
if (!guild) return;
const role = getGuildRoles(guild.id)[id];
const role = GuildStore.getRole(guild.id, id);
if (!role) return;
if (role.colorString) {