Module 584257

1,160 characters · in 30a277b9d32d70b1.js
Dependencies
Required by (1)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{A:()=>h});var i=n(73153),l=n(272355),a=n(961350),r=n(414736),s=n(874486),o=n(927018),d=n(3137),c=n(559908);let u=new Set;class A extends l.A{_initialize(){i.h.subscribe("MESSAGE_CREATE",this.handleMessageCreate),i.h.subscribe("POGGERMODE_SETTINGS_UPDATE",this.handleSettingsUpdate)}_terminate(){i.h.unsubscribe("MESSAGE_CREATE",this.handleMessageCreate),i.h.unsubscribe("POGGERMODE_SETTINGS_UPDATE",this.handleSettingsUpdate)}handleSettingsUpdate=e=>{let{settings:t}=e;t.enabled?(0,r._)(o.sn.ENABLE_POGGERMODE):!1===t.enabled&&(0,r._)(o.sn.DISABLE_POGGERMODE),Object.keys(t).some(e=>e.startsWith("confetti"))&&(0,r._)(o.sn.CUSTOMIZE_CONFETTI)};handleMessageCreate=e=>{let{channelId:t,message:{author:n,nonce:i,mentions:l}}=e;if(!d.A.isEnabled())return!1;let A=a.default.getId();if(l?.find(e=>e.id===A)!=null?(0,r._)(o.sn.PING_ME):(l?.length??0)>0&&n?.id===A&&(0,r._)(o.sn.PING_SOMEONE),!(0,c.gN)(n?.id,A,i,u))return!1;let{combo:h}=c.Ay.getMostRecentMessageCombo(t)??{};if(null==h)return!1;Object.values(o.sn).forEach(e=>{if(null!=s.A.getUnlocked(e))return;let t=(0,o.vM)(e),n=t?.checkUnlock;null==n||!1!==n(h)&&(0,r._)(e)})}}let h=new A}