mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-31 03:33:36 -05:00
Support Fixes
This commit is contained in:
parent
b4b95b1943
commit
a7a722dab9
3 changed files with 496 additions and 510 deletions
|
@ -23,7 +23,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Flex } from "@components/Flex";
|
||||
import { Link } from "@components/Link";
|
||||
import { openUpdaterModal } from "@components/VencordSettings/UpdaterTab";
|
||||
import { Devs, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_SUPPORT_CHANNEL_ID } from "@utils/constants";
|
||||
import { Devs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_GUILD_ID, VC_SUPPORT_CHANNEL_ID } from "@utils/constants";
|
||||
import { sendMessage } from "@utils/discord";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import { Margins } from "@utils/margins";
|
||||
|
@ -40,24 +40,17 @@ import plugins, { PluginMeta } from "~plugins";
|
|||
|
||||
import SettingsPlugin from "./settings";
|
||||
|
||||
const VENCORD_GUILD_ID = "1015060230222131221";
|
||||
const EQUICORD_GUILD_ID = "1015060230222131221";
|
||||
const VENBOT_USER_ID = "1017176847865352332";
|
||||
const KNOWN_ISSUES_CHANNEL_ID = "1222936386626129920";
|
||||
const CodeBlockRe = /```js\n(.+?)```/s;
|
||||
|
||||
const AllowedChannelIds = [
|
||||
SUPPORT_CHANNEL_ID,
|
||||
"1173659827881390160", // Equicord > #dev
|
||||
"1297590739911573585", // Equicord > #support
|
||||
];
|
||||
|
||||
const TrustedRolesIds = [
|
||||
"1026534353167208489", // contributor
|
||||
"1026504932959977532", // regular
|
||||
"1042507929485586532", // donor
|
||||
"1173520023239786538", // Equicord Team
|
||||
"1222677964760682556", // Equicord Contributor
|
||||
"1287079931645263968", // Equibop Contributor
|
||||
"1173343399470964856", // Vencord Contributor
|
||||
];
|
||||
|
||||
|
@ -165,13 +158,15 @@ export default definePlugin({
|
|||
{
|
||||
name: "equicord-debug",
|
||||
description: "Send Equicord debug info",
|
||||
predicate: ctx => isPluginDev(UserStore.getCurrentUser()?.id) || isEquicordPluginDev(UserStore.getCurrentUser()?.id) || AllowedChannelIds.includes(ctx.channel.id),
|
||||
// @ts-expect-error
|
||||
predicate: ctx => isPluginDev(UserStore.getCurrentUser()?.id) || isEquicordPluginDev(UserStore.getCurrentUser()?.id) || GUILD_ID === ctx.guild.id,
|
||||
execute: async () => ({ content: await generateDebugInfoMessage() })
|
||||
},
|
||||
{
|
||||
name: "equicord-plugins",
|
||||
description: "Send Equicord plugin list",
|
||||
predicate: ctx => isPluginDev(UserStore.getCurrentUser()?.id) || isEquicordPluginDev(UserStore.getCurrentUser()?.id) || AllowedChannelIds.includes(ctx.channel.id),
|
||||
// @ts-expect-error
|
||||
predicate: ctx => isPluginDev(UserStore.getCurrentUser()?.id) || isEquicordPluginDev(UserStore.getCurrentUser()?.id) || GUILD_ID === ctx.guild.id,
|
||||
execute: () => ({ content: generatePluginList() })
|
||||
}
|
||||
],
|
||||
|
@ -223,7 +218,7 @@ export default definePlugin({
|
|||
}
|
||||
|
||||
// @ts-ignore outdated type
|
||||
const roles = GuildMemberStore.getSelfMember(VENCORD_GUILD_ID)?.roles || GuildMemberStore.getSelfMember(EQUICORD_GUILD_ID)?.roles;
|
||||
const roles = GuildMemberStore.getSelfMember(VC_GUILD_ID)?.roles || GuildMemberStore.getSelfMember(GUILD_ID)?.roles;
|
||||
if (!roles || TrustedRolesIds.some(id => roles.includes(id))) return;
|
||||
|
||||
if (!IS_WEB && IS_UPDATER_DISABLED) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -18,9 +18,12 @@
|
|||
|
||||
export const WEBPACK_CHUNK = "webpackChunkdiscord_app";
|
||||
export const REACT_GLOBAL = "Vencord.Webpack.Common.React";
|
||||
export const SUPPORT_CHANNEL_ID = "1173342942858055721";
|
||||
export const SUPPORT_CHANNEL_IDS = ["1173342942858055721", "1026515880080842772"];
|
||||
export const SUPPORT_CHANNEL_ID = "1297590739911573585";
|
||||
export const VC_SUPPORT_CHANNEL_ID = "1026515880080842772";
|
||||
export const SUPPORT_CHANNEL_IDS = [SUPPORT_CHANNEL_ID, VC_SUPPORT_CHANNEL_ID];
|
||||
export const GUILD_ID = "1173279886065029291";
|
||||
export const VC_GUILD_ID = "1015060230222131221";
|
||||
export const GUILD_IDS = [GUILD_ID, VC_GUILD_ID];
|
||||
|
||||
export interface Dev {
|
||||
name: string;
|
||||
|
|
Loading…
Reference in a new issue