Skip to content

Commit

Permalink
💀
Browse files Browse the repository at this point in the history
  • Loading branch information
Techbot121 authored and Meta Construct committed May 17, 2024
1 parent c2825de commit ad106db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/services/webapp/api/webhook-handler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GameBridge } from "../../gamebridge";
import { WebApp } from "..";
import { Webhooks, createNodeMiddleware } from "@octokit/webhooks";
import { clamp } from "@/utils";
import { clamp, sleep } from "@/utils";
import Discord from "discord.js";
import axios from "axios";
import webhookConfig from "@/config/webhooks.json";
Expand Down Expand Up @@ -83,7 +83,8 @@ const isRemoteMergeCommit = (message: string) =>
const isMergeCommit = (message: string) =>
message.startsWith("Merge branch") || isRemoteMergeCommit(message);

export default (webApp: WebApp): void => {
export default async (webApp: WebApp): Promise<void> => {
await sleep(1000 * 5); // quick fix until I fix service order
webApp.app.use(createNodeMiddleware(GitHub, { path: "/webhooks/github" }));
let webhook: Discord.Webhook;
let bridge: GameBridge | undefined;
Expand Down

0 comments on commit ad106db

Please sign in to comment.