decord/source/modules/guild_member_verification/GuildJoinRequestAnalyticUtils.tsx

40 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 5593
// Function ID: 5594
// Name: GuildJoinRequestAnalyticUtils
// Dependencies: [502, 2021, 1074, 1242, 2]
2026-07-20 16:05:17 +00:00
// Exports: trackMemberApplicationAction, trackMemberApplicationInterviewMessage, trackMemberApplicationViewed, trackMemberVerificationApplicationViewed
// Module 5593 (GuildJoinRequestAnalyticUtils)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import GuildMemberStore from "GuildMemberStore" /* 2021 */;
2026-07-23 10:11:24 +00:00
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_member_verification/GuildJoinRequestAnalyticUtils.tsx");
2026-07-20 16:05:17 +00:00
export const trackMemberApplicationViewed = function trackMemberApplicationViewed(arg0) {
({ guildId, applicationUserId, applicationStatus } = arg0);
const obj = AnalyticsUtilsDefault;
obj.track(AnalyticEvents.GUILD_MEMBER_APPLICATION_VIEWED, { guild_id: guildId, viewing_user_id: AuthenticationStore.getId(), application_user_id: applicationUserId, application_status: applicationStatus });
2026-07-20 16:05:17 +00:00
};
export const trackMemberApplicationAction = function trackMemberApplicationAction(arg0) {
({ guildId, actionType, applicationUserId } = arg0);
const obj = AnalyticsUtilsDefault;
obj.track(AnalyticEvents.GUILD_MEMBER_APPLICATION_ACTION, { guild_id: guildId, action_type: actionType, application_user_id: applicationUserId, viewing_user_id: AuthenticationStore.getId() });
2026-07-20 16:05:17 +00:00
};
export const trackMemberApplicationInterviewMessage = function trackMemberApplicationInterviewMessage(guildId) {
guildId = guildId.guildId;
({ messageId, channelId, joinRequestStatus, joinRequestUserId } = guildId);
const id = AuthenticationStore.getId();
const member = GuildMemberStore.getMember(guildId, id);
2026-07-20 16:05:17 +00:00
let joinedAt;
2026-07-29 08:29:29 +00:00
if (member != null) {
2026-07-20 16:05:17 +00:00
joinedAt = member.joinedAt;
}
AnalyticsUtilsDefault.track(AnalyticEvents.GUILD_MEMBER_APPLICATION_INTERVIEW_MESSAGE, { guild_id: guildId, channel_id: channelId, message_id: messageId, message_user_id: id, is_member: null != joinedAt, join_request_status: joinRequestStatus, join_request_user_id: joinRequestUserId });
2026-07-20 16:05:17 +00:00
};
export const trackMemberVerificationApplicationViewed = function trackMemberVerificationApplicationViewed(guild_id) {
AnalyticsUtilsDefault.track(AnalyticEvents.MEMBER_VERIFICATION_APPLICATION_VIEWED, { guild_id });
2026-07-20 16:05:17 +00:00
};