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

42 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 12192
// Function ID: 12193
2026-07-20 16:05:17 +00:00
// Name: getActivityChannelId
2026-08-05 07:35:12 +00:00
// Dependencies: [1376, 1372, 4271, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 12192 (getActivityChannelId)
2026-07-29 08:29:29 +00:00
import { isTextChannel } from "createChannelRecord";
import ensureGuildLoaded from "ensureGuildLoaded";
import updateVoiceState from "updateVoiceState";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const result = require("updateVoiceState").fileFinishedImporting("modules/activities/utils/getActivityChannelId.tsx");
2026-07-20 16:05:17 +00:00
export default function getActivityChannelId(userId) {
let activity;
let channelId;
({ channelId, activity } = userId);
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channelId);
2026-07-20 16:05:17 +00:00
let session_id;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
session_id = activity.session_id;
}
let tmp3 = channelId;
if (null != session_id) {
if (null == channel) {
let session_id1;
2026-07-29 08:29:29 +00:00
if (activity != null) {
2026-07-20 16:05:17 +00:00
session_id1 = activity.session_id;
}
2026-07-23 10:11:24 +00:00
voiceStateForSession = voiceStateForSession.getVoiceStateForSession(userId.userId, session_id1);
2026-07-20 16:05:17 +00:00
channelId = undefined;
2026-07-29 08:29:29 +00:00
if (voiceStateForSession != null) {
2026-07-20 16:05:17 +00:00
channelId = voiceStateForSession.channelId;
}
tmp3 = channelId;
} else {
tmp3 = channelId;
}
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};