-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deploy.ts: Uses Deno.serve() instead of fetch event listener #361
Conversation
deploy.ts
Outdated
await client._process(interaction); | ||
return new Response('Error', { | ||
status: 500 | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this returning error (after processing interaction)? It should be 200 as OK or 203 as empty response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, it only gets run if "await client.verifyFetchEvent({ request, respondWith: (res: Response) => { return res; } });" fails to return anything, and is there to avoid TS problems.
deploy.ts
Outdated
) | ||
return | ||
const interaction = await client.verifyFetchEvent({ request, respondWith: (res: Response) => { return res; } }); | ||
if (!interaction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here should be interaction == false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean "interaction === false".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, fixed.
deploy.ts
Outdated
export * from './src/structures/embed.ts' | ||
export * from './src/types/messageComponents.ts' | ||
alfiecrawford@Alfies-Air harmony-main % npx prettier deploy.ts -o output.txt | ||
[warn] Ignored unknown option -o=output.txt. Did you mean -c? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bruh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
About
Deno.server() should be faster, and it supports localhost for local development.
Status