Files
discord-decomp/utils/HelpdeskUtils.tsx
T
2026-11-01 12:12:55 +02:00

36 lines
1.7 KiB
TypeScript

// Metro module 1945 (f1946).
import LocaleStore from "../modules/user_settings/LocaleStore";
import * as _Constants from "../Constants";
import { LocalizedLinks } from "../Constants";
import getLocalizedLink from "../modules/links/getLocalizedLink";
import { getPlatformName } from "./PlatformUtils";
const { SUPPORT_DOMAIN, SUPPORT_DEV_DOMAIN } = _Constants;
let c1629_5 = `https://${SUPPORT_DOMAIN}`;
let c1629_6 = `https://${SUPPORT_DEV_DOMAIN}`;
const r27 = {
getArticleURL: (a0) => c1629_5 + `/hc/${LocaleStore.locale.toLowerCase()}/articles/${a0}`,
getDevArticleURL: (a0) => {
const r12 = `/hc/${LocaleStore.locale.toLowerCase()}/articles/${a0}`;
let r13 = c1629_6;
if (c1629_6 === void 0) {
r13 = c1629_5;
}
return r13 + r12;
},
getCreatorSupportArticleURL: (a0) => "https://creator-support.discord.com" + `/hc/${LocaleStore.locale.toLowerCase()}/articles/${a0}`,
getTwitterURL: () => getLocalizedLink(LocalizedLinks.TWITTER),
getCommunityURL: () => c1629_5 + `/hc/${LocaleStore.locale.toLowerCase()}`,
getSubmitRequestURL: (a0) => {
const r23 = c1629_5 + `/hc/${LocaleStore.locale.toLowerCase()}/requests/new?platform=${encodeURIComponent(getPlatformName())}`;
return a0 != null ? r23 + `&device_info=${encodeURIComponent(a0)}` : r23;
},
getSearchURL: (a0) => {
const r9 = encodeURIComponent(a0);
return c1629_5 + `/hc/${LocaleStore.locale.toLowerCase()}/search?utf8=%E2%9C%93&query=${r9}&commit=Search`;
},
getFeaturedArticlesJsonURL: () => c1629_5 + "/api/v2/help_center/en-us/articles.json?label_names=featured",
getAppsSupportURL: (a0) => "https://support-apps.discord.com" + `/hc/${LocaleStore.locale.toLowerCase()}/articles/${a0}`
};
export default r27;
export { c1629_5 as SUPPORT_LOCATION };