2026-08-12 06:57:52 +00:00
|
|
|
// Module ID: 8149
|
|
|
|
|
// Function ID: 8150
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: pickHelloSticker
|
2026-08-12 06:57:52 +00:00
|
|
|
// Dependencies: [1922, 8150, 676, 11, 6959, 698, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: handleWelcomeCtaClicked, pickHelloSticker, pickWelcomeSticker
|
|
|
|
|
|
2026-08-12 06:57:52 +00:00
|
|
|
// Module 8149 (pickHelloSticker)
|
2026-07-29 08:29:29 +00:00
|
|
|
import mergeGuildAvatar from "mergeGuildAvatar";
|
2026-07-23 10:11:24 +00:00
|
|
|
import { WELCOME_STICKERS } from "items";
|
|
|
|
|
import { AnalyticEvents } from "ME";
|
|
|
|
|
|
|
|
|
|
const result = require("ME").fileFinishedImporting("modules/welcome_cta/WelcomeCTAUtils.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const pickHelloSticker = function pickHelloSticker() {
|
|
|
|
|
const currentUser = authStore.getCurrentUser();
|
|
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (currentUser != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = currentUser.id;
|
|
|
|
|
}
|
|
|
|
|
let num = 0;
|
|
|
|
|
if (null != id) {
|
2026-07-29 08:29:29 +00:00
|
|
|
num = importDefault(11).extractTimestamp(id);
|
|
|
|
|
const obj = importDefault(11);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
return WELCOME_STICKERS[num % WELCOME_STICKERS.length];
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const pickWelcomeSticker = function pickWelcomeSticker(id) {
|
|
|
|
|
const currentUser = authStore.getCurrentUser();
|
|
|
|
|
id = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (currentUser != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = currentUser.id;
|
|
|
|
|
}
|
|
|
|
|
let num = 0;
|
|
|
|
|
if (null != id) {
|
2026-07-29 08:29:29 +00:00
|
|
|
num = importDefault(11).extractTimestamp(id);
|
|
|
|
|
const obj = importDefault(11);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj2 = importDefault(11);
|
2026-07-23 10:11:24 +00:00
|
|
|
return WELCOME_STICKERS[(num + obj2.extractTimestamp(obj2, id)) % WELCOME_STICKERS.length];
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
export const handleWelcomeCtaClicked = function handleWelcomeCtaClicked(messageChannel, message, stickerId) {
|
2026-08-12 06:57:52 +00:00
|
|
|
let obj = importDefault(6959);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj = { channel: messageChannel, message, shouldMention: true, showMentionToggle: true };
|
2026-08-12 06:57:52 +00:00
|
|
|
obj.sendGreetMessage(messageChannel.id, stickerId, importDefault(6959).getSendMessageOptionsForReply(obj));
|
|
|
|
|
const obj2 = importDefault(6959);
|
2026-07-29 08:29:29 +00:00
|
|
|
obj = { is_reply: true, sticker_id: stickerId, target_user: message.author.id, sender: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
const currentUser = authStore.getCurrentUser();
|
|
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (currentUser != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = currentUser.id;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[3] = id;
|
|
|
|
|
importDefault(698).track(AnalyticEvents.WELCOME_CTA_CLICKED, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|