decord/source/modules/routing/getChannelIdForGuildTransition.tsx

77 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 5878
// Function ID: 5879
2026-07-20 16:05:17 +00:00
// Name: getChannelIdForGuildTransition
2026-08-12 06:57:52 +00:00
// Dependencies: [1394, 5277, 1391, 1980, 1910, 1979, 5879, 676, 1398, 5883, 5885, 5887, 1913, 2]
2026-07-20 16:05:17 +00:00
// Exports: getChannelIdForGuildTransition
2026-08-12 06:57:52 +00:00
// Module 5878 (getChannelIdForGuildTransition)
2026-08-06 08:05:19 +00:00
import initializeFromUserSettings from "initializeFromUserSettings";
2026-07-29 08:29:29 +00:00
import shouldShowOnboarding from "shouldShowOnboarding";
import ensureGuildLoaded from "ensureGuildLoaded";
import comparator from "comparator";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import handleConnectionOpen from "handleConnectionOpen";
import makeSortedChannel from "makeSortedChannel";
2026-07-23 10:11:24 +00:00
import { ME } from "ME";
import { StaticChannelRoute } from "set";
const require = arg1;
2026-08-06 08:05:19 +00:00
const result = require("ensureGuildLoaded").fileFinishedImporting("modules/routing/getChannelIdForGuildTransition.tsx");
2026-07-20 16:05:17 +00:00
2026-08-06 08:05:19 +00:00
export const getChannelIdForGuildTransition = function getChannelIdForGuildTransition(guildId) {
channelId = channelId.getChannelId(guildId);
defaultChannel = defaultChannel.getDefaultChannel(guildId);
let id;
2026-07-29 08:29:29 +00:00
if (defaultChannel != null) {
2026-07-20 16:05:17 +00:00
id = defaultChannel.id;
}
2026-07-29 08:29:29 +00:00
if (id == null) {
2026-07-20 16:05:17 +00:00
let tmp5;
2026-08-06 08:05:19 +00:00
if (guildId === ME) {
2026-07-23 10:11:24 +00:00
privateChannelIds = privateChannelIds.getPrivateChannelIds();
2026-07-20 16:05:17 +00:00
let first;
if (privateChannelIds.length > 0) {
first = privateChannelIds[0];
}
tmp5 = first;
}
id = tmp5;
}
if (channelId === StaticChannelRoute.GUILD_ONBOARDING) {
2026-08-06 08:05:19 +00:00
if (!shouldShowOnboarding.shouldShowOnboarding(guildId)) {
2026-07-20 16:05:17 +00:00
return id;
}
}
if (channelId === StaticChannelRoute.GUILD_HOME) {
2026-08-06 08:05:19 +00:00
if (!obj.canSeeOnboardingHome(guildId)) {
2026-07-20 16:05:17 +00:00
return id;
}
2026-08-12 06:57:52 +00:00
obj = require(5883) /* useCanSeeOnboardingHome */;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (channelId === StaticChannelRoute.GUILD_SPACE) {
2026-08-06 08:05:19 +00:00
if (obj5.canUseGuildSpace(guild.getGuild(guildId), "getChannelIdForGuildTransition")) {
2026-07-23 10:11:24 +00:00
id = channelId;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
return id;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
if (channelId === tmp8.GAME_SHOP) {
2026-08-06 08:05:19 +00:00
if (obj2.canSeeGameShop(guildId)) {
2026-07-23 10:11:24 +00:00
return channelId;
}
2026-08-12 06:57:52 +00:00
obj2 = require(5887) /* getPrice */;
2026-07-23 10:11:24 +00:00
}
channel = channel.getChannel(channelId);
2026-08-06 08:05:19 +00:00
if (null != channel) {
if (!channel.isGuildVocal()) {
let tmp17 = channelId;
if (obj4.isFavoritesGuildId(guildId)) {
tmp17 = channelId;
}
2026-08-11 06:20:06 +00:00
obj4 = require(1913) /* getFavoritesAwareGuildName */;
2026-08-06 08:05:19 +00:00
}
return tmp17;
2026-07-23 10:11:24 +00:00
}
2026-08-06 08:05:19 +00:00
tmp17 = id;
2026-07-20 16:05:17 +00:00
}
};