decord/beta/source/records/VoiceStateRecord.tsx

45 lines
1.4 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 5114
// Function ID: 5115
// Name: VoiceStateRecord
2026-10-12 16:32:48 +00:00
// Dependencies: [1405, 2]
2026-10-12 16:32:48 +00:00
// Module 5114 (VoiceStateRecord)
import Record from "Record" /* 1405 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("records/VoiceStateRecord.tsx");
2026-10-01 14:13:23 +00:00
class VoiceStateRecord extends Record {
constructor(userId) {
let discoverable;
const tmp2 = new VoiceStateRecord(tmp, this);
const tmp3 = userId.userId || "";
tmp2.userId = tmp3;
2026-10-01 14:13:23 +00:00
tmp2.channelId = userId.channelId || null;
tmp2.sessionId = userId.sessionId || null;
tmp2.mute = userId.mute || false;
tmp2.deaf = userId.deaf || false;
tmp2.selfMute = userId.selfMute || false;
tmp2.selfDeaf = userId.selfDeaf || false;
tmp2.selfVideo = userId.selfVideo || false;
tmp2.selfStream = userId.selfStream || false;
tmp2.suppress = userId.suppress || false;
({ requestToSpeakTimestamp: tmp2.requestToSpeakTimestamp, discoverable } = userId);
if (discoverable == null) {
discoverable = true;
}
tmp2.discoverable = discoverable;
2026-10-01 14:13:23 +00:00
tmp2.connectedAt = userId.connectedAt;
return tmp2;
}
2026-10-01 14:13:23 +00:00
isVoiceMuted() {
const self = this;
return this.selfMute || self.mute || self.suppress || null != self.requestToSpeakTimestamp;
}
isVoiceDeafened() {
return this.selfDeaf || this.deaf;
}
}
const prototype = VoiceStateRecord.prototype;
export default VoiceStateRecord;