This snippet shows you how to use the new response.create api with replying to slash commands
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
await lib.discord.interactions['@1.0.0'].responses.create({
token: `${context.params.event.token}`,
response_type: 'DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE',
});
await lib.discord.interactions['@1.0.0'].followups.create({
token: `${context.params.event.token}`,
content: `Pong! this is a slash command reply.`,
});