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

@ -7,7 +7,6 @@
import { definePluginSettings } from "@api/Settings";
import { makeRange } from "@components/PluginSettings/components";
import { Devs } from "@utils/constants";
import { getGuildRoles } from "@utils/discord";
import { Logger } from "@utils/Logger";
import definePlugin, { OptionType, PluginNative } from "@utils/types";
import { findByPropsLazy } from "@webpack";
@ -197,7 +196,7 @@ export default definePlugin({
if (message.mention_roles.length > 0) {
for (const roleId of message.mention_roles) {
const role = getGuildRoles(channel.guild_id)[roleId];
const role = GuildStore.getRole(channel.guild_id, roleId);
if (!role) continue;
const roleColor = role.colorString ?? `#${pingColor}`;
finalMsg = finalMsg.replace(`<@&${roleId}>`, `<b><color=${roleColor}>@${role.name}</color></b>`);