decord/source/modules/activities/utils/InviteEmbedTextUtils.tsx

176 lines
7 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 12686
// Function ID: 12687
2026-07-29 08:29:29 +00:00
// Name: getAskToJoinText
2026-08-12 06:57:52 +00:00
// Dependencies: [1922, 676, 1236, 2757, 4533, 2]
2026-07-29 08:29:29 +00:00
// Exports: getDeadGameInviteText, getHeaderText, getPartyText, getRequestToStreamText
2026-07-20 16:05:17 +00:00
2026-08-12 06:57:52 +00:00
// Module 12686 (getAskToJoinText)
2026-07-29 08:29:29 +00:00
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import { ActivityActionTypes } from "ME";
const require = arg1;
2026-07-29 08:29:29 +00:00
function getAskToJoinText(author, name_override, isPrivate, id1, arg4) {
2026-07-20 16:05:17 +00:00
if (author.author.id === id1) {
if (isPrivate.isPrivate()) {
2026-07-23 10:11:24 +00:00
user = user.getUser(isPrivate.getRecipientId());
2026-07-20 16:05:17 +00:00
if (null != user) {
2026-07-29 08:29:29 +00:00
const intl2 = require(1236) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const formatToPlainString2 = intl2.formatToPlainString;
2026-07-29 08:29:29 +00:00
const t2 = require(1236) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (arg4) {
2026-07-29 08:29:29 +00:00
let obj = { username: null, appName: null };
obj[0] = user.globalName;
obj[1] = name_override;
2026-07-20 16:05:17 +00:00
let formatToPlainString2Result = formatToPlainString2(t2.JddpN2, obj);
} else {
2026-07-29 08:29:29 +00:00
obj = { username: null, appName: null };
obj[0] = user.globalName;
obj[1] = name_override;
2026-07-20 16:05:17 +00:00
formatToPlainString2Result = formatToPlainString2(t2.gYVkSW, obj);
}
return formatToPlainString2Result;
}
}
2026-07-29 08:29:29 +00:00
const intl = require(1236) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const formatToPlainString = intl.formatToPlainString;
2026-07-29 08:29:29 +00:00
const t = require(1236) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (arg4) {
2026-07-29 08:29:29 +00:00
const obj1 = { appName: null };
obj1[0] = name_override;
2026-07-23 10:11:24 +00:00
let formatToPlainStringResult = formatToPlainString(t["2N1kNS"], obj1);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj2 = { appName: null };
obj2[0] = name_override;
2026-07-20 16:05:17 +00:00
formatToPlainStringResult = formatToPlainString(t.IA6uDV, obj2);
}
return formatToPlainStringResult;
} else {
2026-07-29 08:29:29 +00:00
const intl3 = require(1236) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
const formatToPlainString3 = intl3.formatToPlainString;
2026-07-29 08:29:29 +00:00
const t3 = require(1236) /* getSystemLocale */.t;
2026-07-20 16:05:17 +00:00
if (arg4) {
2026-07-29 08:29:29 +00:00
const obj3 = { username: null, appName: null };
obj3[0] = author.author.globalName;
obj3[1] = name_override;
2026-07-20 16:05:17 +00:00
let formatToPlainString3Result = formatToPlainString3(t3.XE8axA, obj3);
} else {
2026-07-29 08:29:29 +00:00
obj = { username: null, appName: null };
obj[0] = author.author.globalName;
obj[1] = name_override;
2026-07-20 16:05:17 +00:00
formatToPlainString3Result = formatToPlainString3(t3.hgcjOn, obj);
}
return formatToPlainString3Result;
}
}
2026-07-23 10:11:24 +00:00
const result = require("getSystemLocale").fileFinishedImporting("modules/activities/utils/InviteEmbedTextUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const getHeaderText = function getHeaderText(arg0, arg1, arg2) {
2026-07-20 16:05:17 +00:00
if (ActivityActionTypes.LISTEN === arg1) {
2026-07-29 08:29:29 +00:00
const intl5 = require(1236) /* getSystemLocale */.intl;
let obj = { name: null };
obj[0] = arg0;
return intl5.formatToPlainString(require(1236) /* getSystemLocale */.t["/8czH4"], obj);
} else if (tmp.WATCH === arg1) {
const intl4 = require(1236) /* getSystemLocale */.intl;
obj = { name: null };
obj[0] = arg0;
return intl4.formatToPlainString(require(1236) /* getSystemLocale */.t.BBJXVk, obj);
} else if (tmp.JOIN === arg1) {
2026-07-20 16:05:17 +00:00
let stringResult;
if (!arg2) {
2026-07-29 08:29:29 +00:00
const intl3 = require(1236) /* getSystemLocale */.intl;
stringResult = intl3.string(require(1236) /* getSystemLocale */.t.pkq6Vq);
2026-07-20 16:05:17 +00:00
}
return stringResult;
2026-07-29 08:29:29 +00:00
} else if (tmp.STREAM_REQUEST === arg1) {
const intl2 = require(1236) /* getSystemLocale */.intl;
2026-08-11 06:20:06 +00:00
return intl2.string(importDefault(2757).DKHhec);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const JOIN_REQUEST = tmp.JOIN_REQUEST;
const intl = require(1236) /* getSystemLocale */.intl;
return intl.string(require(1236) /* getSystemLocale */.t.Ckxb6j);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
export const getRequestToStreamText = function getRequestToStreamText(author, guild_id, id) {
if (author.author.id === id) {
const intl2 = require(1236) /* getSystemLocale */.intl;
2026-08-11 06:20:06 +00:00
let stringResult = intl2.string(importDefault(2757)["8B3U5O"]);
2026-07-29 08:29:29 +00:00
} else {
const intl = require(1236) /* getSystemLocale */.intl;
const obj = { username: null };
2026-08-12 06:57:52 +00:00
obj[0] = require(4533) /* getNickname */.getName(guild_id.guild_id, guild_id.id, author.author);
2026-08-11 06:20:06 +00:00
stringResult = intl.formatToPlainString(importDefault(2757)["d/qbC0"], obj);
2026-08-12 06:57:52 +00:00
const obj2 = require(4533) /* getNickname */;
2026-07-29 08:29:29 +00:00
}
return stringResult;
};
2026-07-20 16:05:17 +00:00
export { getAskToJoinText };
2026-07-29 08:29:29 +00:00
export const getDeadGameInviteText = function getDeadGameInviteText(activity, name_override, guild_id, id1, arg4) {
2026-07-20 16:05:17 +00:00
activity = activity.activity;
let type;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
type = activity.type;
}
if (ActivityActionTypes.LISTEN !== type) {
2026-07-29 08:29:29 +00:00
if (tmp2.WATCH !== type) {
if (tmp2.JOIN !== type) {
if (tmp2.STREAM_REQUEST === type) {
if (activity.author.id === id1) {
const intl2 = require(1236) /* getSystemLocale */.intl;
2026-08-11 06:20:06 +00:00
let stringResult = intl2.string(importDefault(2757)["8B3U5O"]);
2026-07-29 08:29:29 +00:00
} else {
const intl = require(1236) /* getSystemLocale */.intl;
const obj = { username: null };
2026-08-12 06:57:52 +00:00
obj[0] = require(4533) /* getNickname */.getName(guild_id.guild_id, guild_id.id, activity.author);
2026-08-11 06:20:06 +00:00
stringResult = intl.formatToPlainString(importDefault(2757)["d/qbC0"], obj);
2026-08-12 06:57:52 +00:00
const obj2 = require(4533) /* getNickname */;
2026-07-29 08:29:29 +00:00
}
return stringResult;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const JOIN_REQUEST = tmp2.JOIN_REQUEST;
return getAskToJoinText(activity, name_override, guild_id, id1, true);
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
const intl3 = require(1236) /* getSystemLocale */.intl;
const t = require(1236) /* getSystemLocale */.t;
return intl3.string(arg4 ? t.x1UXGR : t["Ek+51n"]);
2026-07-20 16:05:17 +00:00
};
export const getPartyText = function getPartyText(arg0) {
let activityActionType;
let maxPartySize;
let partySize;
({ activityActionType, maxPartySize, partySize } = arg0);
if (activityActionType === ActivityActionTypes.STREAM_REQUEST) {
return "";
} else {
2026-07-29 08:29:29 +00:00
if (activityActionType !== tmp.LISTEN) {
2026-07-20 16:05:17 +00:00
if (maxPartySize > 0) {
2026-07-29 08:29:29 +00:00
const intl2 = require(1236) /* getSystemLocale */.intl;
let obj = { partySize: null, maxPartySize: null };
obj[0] = partySize;
obj[1] = maxPartySize;
let formatToPlainStringResult = intl2.formatToPlainString(require(1236) /* getSystemLocale */.t.gLu7NU, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = require(1236) /* getSystemLocale */.intl;
obj = { partySize: null };
obj[0] = partySize;
formatToPlainStringResult = intl.formatToPlainString(require(1236) /* getSystemLocale */.t["65JnWC"], obj);
2026-07-20 16:05:17 +00:00
}
}
if (maxPartySize > 0) {
2026-07-29 08:29:29 +00:00
const intl4 = require(1236) /* getSystemLocale */.intl;
obj = { partySize: null, maxPartySize: null };
obj[0] = partySize;
obj[1] = maxPartySize;
let formatToPlainStringResult1 = intl4.formatToPlainString(require(1236) /* getSystemLocale */.t.Zogoou, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl3 = require(1236) /* getSystemLocale */.intl;
const obj1 = { partySize: null };
obj1[0] = partySize;
formatToPlainStringResult1 = intl3.formatToPlainString(require(1236) /* getSystemLocale */.t.UGei0j, obj1);
2026-07-20 16:05:17 +00:00
}
}
};