I'm trying to use the bot, but it doesn't give me commands to use
Since I can't send messages of type body.type == InteractionType.APPLICATION_COMMAND for some reason, the bot completely ignores me when I try to use commands.
The issue starts at the bottom of this code
// Process a Discord interaction POST request
const handleInteraction = async ({ request, wait }) => {
// Get the body as a buffer and as text
const bodyBuffer = await request.arrayBuffer();
const bodyText = (new TextDecoder("utf-8")).decode(bodyBuffer);
// Verify a legitimate request
if (!handleInteractionVerification(request, bodyBuffer))
return new Response(null, { status: 401 });
// Work with JSON body going forward
const body = JSON.parse(bodyText);
// Handle a PING
if (body.type === InteractionType.PING)
return jsonResponse({
type: InteractionResponseType.PONG
});
try {
if (body.type == InteractionType.APPLICATION_COMMAND) { // handle commands
I'm trying to use the bot, but it doesn't give me commands to use
Since I can't send messages of type
body.type == InteractionType.APPLICATION_COMMAND
for some reason, the bot completely ignores me when I try to use commands.The issue starts at the bottom of this code