Build 533169stable
Module 212371
764 characters · in 30a277b9d32d70b1.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>_});var i=n(73153),l=n(827343),a=n(401843),r=n(272355),s=n(652896),o=n(616356),d=n(961350),c=n(734057),u=n(430452),A=n(105530);class h extends r.A{_initialize(){i.h.subscribe("VOICE_STATE_UPDATES",this.handleVoiceStateUpdates)}_terminate(){i.h.unsubscribe("VOICE_STATE_UPDATES",this.handleVoiceStateUpdates)}handleVoiceStateUpdates=e=>{let{voiceStates:t}=e,n=d.default.getId();t.forEach(e=>{e.userId===n&&c.A.getChannel(e.channelId)?.isGuildStageVoice()&&(0,A.eY)(e)!==A.zF.ON_STAGE&&(this.handleStopStream(e),this.handleStopUserVideo())})};handleStopStream=e=>{let t=o.A.getActiveStreamForUser(e.userId,e.guildId);null!=t&&(0,a.vN)((0,s._z)(t),!1)};handleStopUserVideo=()=>{u.Ay.isVideoEnabled()&&l.A.setVideoEnabled(!1)}}let _=new h}