The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

update failed captcha handling

Luna daa4b733 84d3022b

-24
-24
utils/captcha.ts
··· 75 75 setState(State.Success); 76 76 }); 77 77 78 - captcha.onFail(async () => { 79 - setState(State.Loading); 80 - 81 - const res = await fetch(`${process.env.NEXT_PUBLIC_API + path}?captcha-failed=true`, { 82 - method: "POST", 83 - credentials: "include" 84 - }); 85 - 86 - if (res.status === 409) { 87 - setState(State.Idle); 88 - return; 89 - } 90 - 91 - captcha.destroy(); 92 - setState(State.Idle); 93 - 94 - const { message } = res 95 - ? await res.json() 96 - : { message: "Unknown server error" }; 97 - 98 - setError(message); 99 - return; 100 - }); 101 - 102 78 captcha.onError((err: string) => { 103 79 captcha.reset(); 104 80 setState(State.Idle);