Skip to content

Commit

Permalink
discord: switch to using threads
Browse files Browse the repository at this point in the history
  • Loading branch information
AnInternetTroll committed Sep 15, 2024
1 parent 5c248a8 commit 81fa5e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function submitForm(req: Request): Promise<Response> {
const { captcha } = getCookies(req.headers);
const captchaHash = await hashCaptcha(body.get("captcha")?.trim() ?? "");

if (await hashCaptcha(body.get("captcha")?.trim() ?? "") !== captcha) {
if (captchaHash !== captcha) {
return new Response("Captcha failed, please try again.", {
status: STATUS_CODE.BadRequest,
statusText: STATUS_TEXT[STATUS_CODE.BadRequest],
Expand Down Expand Up @@ -155,6 +155,7 @@ author`,
},
body: JSON.stringify({
content: null,
thread_name: game.name,
embeds: [
{
color: 2424603,
Expand Down
2 changes: 1 addition & 1 deletion config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const webhookURL = {
bedrock: Deno.env.get("BEDROCK"),
other: Deno.env.get("OTHER"),
java: Deno.env.get("JAVA"),
};
} as const;

0 comments on commit 81fa5e7

Please sign in to comment.