Module 225315

1,189 characters · in dec9f7617b3042f8.js
Dependencies
Lazily required by (0)none
Requires (3)
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{Fy:()=>E,Vv:()=>d,Xx:()=>h,i4:()=>c,oZ:()=>s,ry:()=>r});var i=n(636537),l=n(228366),a=n(652215);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.h.dispatch({type:"WELCOME_SCREEN_VIEW",guildId:e,isLurking:t})}async function E(e){l.h.dispatch({type:"WELCOME_SCREEN_FETCH_START"});try{let t=await i.Bo.get({url:a.Rsh.GUILD_WELCOME_SCREEN(e),oldFormErrors:!0,rejectWithError:!0});return l.h.dispatch({type:"WELCOME_SCREEN_FETCH_SUCCESS",guildId:e,welcomeScreen:t.body}),t.body}catch(e){l.h.dispatch({type:"WELCOME_SCREEN_FETCH_FAIL"})}}function s(){l.h.dispatch({type:"WELCOME_SCREEN_SETTINGS_RESET"})}function d(){l.h.dispatch({type:"WELCOME_SCREEN_SETTINGS_CLEAR"})}function h(e){l.h.dispatch({type:"WELCOME_SCREEN_SETTINGS_UPDATE",settings:e})}async function c(e,t){l.h.dispatch({type:"WELCOME_SCREEN_SUBMIT"});try{let n=await i.Bo.patch({url:a.Rsh.GUILD_WELCOME_SCREEN(e),body:{description:t.description,welcome_channels:t.channels,enabled:t.enabled},oldFormErrors:!0,rejectWithError:!0});l.h.dispatch({type:"WELCOME_SCREEN_SUBMIT_SUCCESS",guildId:e,welcomeScreen:n.body})}catch(e){l.h.dispatch({type:"WELCOME_SCREEN_SUBMIT_FAILURE"})}}}