Module 310527

795 characters · in 158ccf38b98a2627.js
Dependencies
Required by (2)
Lazily required by (0)none
Requires (3)
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{Je:()=>o,OH:()=>s,fx:()=>a,zf:()=>E});var l=n(636537),r=n(228366),i=n(652215);function o(e){return l.Bo.get({url:i.Rsh.GUILD_VANITY_URL(e),oldFormErrors:!0,rejectWithError:!0}).then(e=>{let{body:{code:t,uses:n,error:l}}=e;r.h.dispatch({type:"GUILD_SETTINGS_SET_VANITY_URL",code:t,uses:n,error:l})})}function a(){r.h.dispatch({type:"GUILD_SETTINGS_VANITY_URL_RESET"})}function s(e){r.h.dispatch({type:"GUILD_SETTINGS_VANITY_URL_SET",code:e})}function E(e,t,n){return l.Bo.patch({url:i.Rsh.GUILD_VANITY_URL(e),body:{code:t},oldFormErrors:!0,rejectWithError:!1}).then(e=>{let{body:{code:t,uses:n}}=e;r.h.dispatch({type:"GUILD_SETTINGS_SET_VANITY_URL",code:t,uses:n})},e=>{if(r.h.dispatch({type:"GUILD_SETTINGS_VANITY_URL_ERROR",error:e.body}),n?.throwErr)throw e;return e})}}