mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 01:59:08 +00:00
fix(interactions): deployment + handler
This commit is contained in:
parent
3ca37cff17
commit
61b1146774
7 changed files with 58 additions and 12 deletions
|
@ -17,12 +17,12 @@ const commands: Record<
|
|||
};
|
||||
|
||||
export const interactionHandler = async (request: Request): Promise<Response> => {
|
||||
if (!(await verifyRequest(request))) {
|
||||
const interaction = (await request.json()) as InteractionRequest;
|
||||
|
||||
if (!verifyRequest(request, interaction)) {
|
||||
return new Response('invalid request signature', { status: 401 });
|
||||
}
|
||||
|
||||
const interaction = (await request.json()) as InteractionRequest;
|
||||
|
||||
if (interaction.type === InteractionType.PING) {
|
||||
return respond({ type: 1 });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue