case InteractionType.ApplicationCommand: switch (interaction.data.type) { case ApplicationCommandType.ChatInput: console.log("chat input command", interaction.data.name); return handleCommand( interaction as APIChatInputApplicationCommandInteraction, env, ctx, commands ); default: return; }