decord/source/modules/app_dms/getAppDMApplication.tsx

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 11370
// Function ID: 11371
2026-07-20 16:05:17 +00:00
// Name: getAppDMApplication
2026-07-29 08:29:29 +00:00
// Dependencies: [4226, 5896, 1874, 2]
2026-07-20 16:05:17 +00:00
// Exports: getAppDMApplication
2026-07-29 08:29:29 +00:00
// Module 11370 (getAppDMApplication)
import addApplication from "addApplication";
import createUserWidgetFromServer from "createUserWidgetFromServer";
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const result = require("mergeGuildAvatar").fileFinishedImporting("modules/app_dms/getAppDMApplication.tsx");
2026-07-20 16:05:17 +00:00
export const getAppDMApplication = function getAppDMApplication(channel) {
let recipientId;
if (channel.isPrivate()) {
recipientId = channel.getRecipientId();
}
2026-07-23 10:11:24 +00:00
user = user.getUser(recipientId);
2026-07-20 16:05:17 +00:00
let bot;
2026-07-29 08:29:29 +00:00
if (user != null) {
2026-07-20 16:05:17 +00:00
bot = user.bot;
}
let tmp4;
if (true === bot) {
tmp4 = recipientId;
}
2026-07-29 08:29:29 +00:00
appIdForBotUserId = appIdForBotUserId.getAppIdForBotUserId(tmp4);
2026-07-20 16:05:17 +00:00
if (null != tmp4) {
2026-07-23 10:11:24 +00:00
userProfile = userProfile.getUserProfile(tmp4);
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (userProfile != null) {
2026-07-20 16:05:17 +00:00
const application = userProfile.application;
2026-07-29 08:29:29 +00:00
if (application != null) {
2026-07-20 16:05:17 +00:00
id = application.id;
}
}
2026-07-29 08:29:29 +00:00
const tmp6 = id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (appIdForBotUserId == null) {
appIdForBotUserId = tmp6;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return appIdForBotUserId.getApplication(appIdForBotUserId);
2026-07-20 16:05:17 +00:00
};