Files
discord-decomp/modules/private_channel_integrations/PrivateChannelIntegrationSystemMessageUtils.tsx
T
2026-11-01 12:12:55 +02:00

69 lines
2.6 KiB
TypeScript

// Metro module 7778 (f7779).
import { HelpdeskArticles, NOOP } from "../../Constants";
import { intl, t } from "../../intl/index.native";
import HelpdeskUtils from "../../utils/HelpdeskUtils";
export function getPrivateChannelIntegrationAddedSystemMessageContent({ application, username, usernameHook = NOOP, applicationNameHook = NOOP }) {
return application != null ? intl.format(t.J8SaGy, {
username,
otherUsername: application.name,
usernameHook,
otherUsernameHook: applicationNameHook,
helpCenterLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}) : intl.format(t["+6V2sd"], {
username,
usernameHook,
helpCenterLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
});
}
export function getPrivateChannelIntegrationRemovedSystemMessageContent({ application, username, usernameHook = NOOP, applicationNameHook = NOOP }) {
return application != null ? intl.format(t.eGCDak, {
username,
otherUsername: application.name,
usernameHook,
otherUsernameHook: applicationNameHook,
helpCenterLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}) : intl.format(t.sAX6rs, {
username,
usernameHook,
helpCenterLink: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
});
}
export function getPrivateChannelIntegrationAddedSystemMessageASTContent({ application, username, usernameOnClick, applicationNameOnClick, medium }) {
return application != null ? intl.formatToParts(t["8r+Z+I"], {
username,
otherUsername: application.name,
usernameOnClick,
otherUsernameOnClick: applicationNameOnClick,
medium,
helpCenterLink: {
url: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}
}) : intl.formatToParts(t.ojysqe, {
username,
usernameOnClick,
medium,
helpCenterLink: {
url: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}
});
}
export function getPrivateChannelIntegrationRemovedSystemMessageASTContent({ application, username, usernameOnClick, applicationNameOnClick, medium }) {
return application != null ? intl.formatToParts(t.zmc0mq, {
username,
otherUsername: application.name,
usernameOnClick,
otherUsernameOnClick: applicationNameOnClick,
medium,
helpCenterLink: {
url: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}
}) : intl.formatToParts(t["x2CN/Z"], {
username,
usernameOnClick,
medium,
helpCenterLink: {
url: HelpdeskUtils.getArticleURL(HelpdeskArticles.PRIVATE_CHANNEL_INTEGRATIONS)
}
});
}