Module 310527

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