mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-20 03:47:01 -04:00
Visual Refresh
Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com> Co-Authored-By: doyle31 <abacubabacus@gmail.com> Co-Authored-By: iilwy <iilwy@omg.games> Co-Authored-By: Noa <164402463+nroggendorff@users.noreply.github.com> Co-Authored-By: rini c <rini@rinici.de> Co-Authored-By: Cassie <37855219+codef53@users.noreply.github.com> Co-Authored-By: jamesbt365 <moxy@mothoxi.de> Co-Authored-By: khcrysalis <97859147+khcrysalis@users.noreply.github.com> Co-Authored-By: nin0dev <75569739+nin0-dev@users.noreply.github.com>
This commit is contained in:
parent
fce4ffaabb
commit
ca4b63c386
23 changed files with 283 additions and 101 deletions
|
@ -20,11 +20,17 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Devs } from "@utils/constants";
|
||||
import { getIntlMessage } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Constants, GuildStore, RestAPI } from "@webpack/common";
|
||||
import { Constants, GuildStore, PermissionStore, RestAPI } from "@webpack/common";
|
||||
|
||||
function showDisableInvites(guildId: string) {
|
||||
// @ts-ignore
|
||||
return !GuildStore.getGuild(guildId).hasFeature("INVITES_DISABLED");
|
||||
const guild = GuildStore.getGuild(guildId);
|
||||
if (!guild) return false;
|
||||
|
||||
return (
|
||||
// @ts-ignore
|
||||
!guild.hasFeature("INVITES_DISABLED") &&
|
||||
PermissionStore.getGuildPermissionProps(guild).canManageRoles
|
||||
);
|
||||
}
|
||||
|
||||
function disableInvites(guildId: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue