
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
autocode-discord-interaction
Advanced tools
This npm makes it easy to use the discord interactions inside autocode.
This npm makes it easy to use discord interactions inside autocode.
Improved returned response schemes.
Added support for modal interaction. example
A small bug fixed.
Forgot to add form-data package inside the npm so error go brrrr.... 🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️
Fixed a small bug where it will give error when attachments params is not provided. 😅🤦♂️
| API types | Description |
|---|---|
| command_reply | Reply to any application command. Eg: slash command |
| command_defer | Reply with a thinking message to any application command that can be edited later. |
| component_defer | Acknowledge a message component that can be edited later. Eg: buttons |
| component_update | Update the message where the component was present. |
| autocomplete | Return some choices to the user. |
| form_modal | Reply with a popup form. |
| API types | Description |
|---|---|
| edit_original | Edit the original message created for the interaction. |
| get_original | Get info about the original message created for the interaction. |
| delete_original | Delete the original message created for the interaction. |
| create | Create a new followup message for an interaction. (can only be used if the interaction was already replied by any of the callback apis) |
| get | Get info about any newly created followup message. |
| edit | Edit any followup message |
| delete | Delete any followup message |
Note: Some of the apis for followup are not fully tested, so if you find any bugs please report it.
await interaction.callback.form_modal(event, {
custom_id: `form_1`,
title: 'This is an example form',
text_inputs: [
{
style: 'short',
custom_id: 'name',
label: `What's your name?`,
placeholder: `write your name here`, // optional
required: true, // optional
//value: 'some default value',
//max_length: 100,
min_length: 1, // optional
},
{
style: 'long',
custom_id: 'description',
label: `Describe yourself.`,
placeholder: `Some text here`, // optional
required: true, // optional
//value: 'some default value',
//max_length: 100,
min_length: 1, // optional
},
]
})

You can upto 5 text inputs
const interaction = require('autocode-discord-interaction')
await interaction.callback.command_reply(context.params.event,{
content: 'file',
attachments: [
{
name: 'file.txt', //any file name with extension
buffer: Buffer.from('hello'), //any buffer under 8 mb, could be more if the server is boosted
description: 'some text' //any string, this params is optional
}
]
})
You can upload upto 10 file in one message.
const interaction = require('autocode-discord-interaction')
await interaction.callback.command_reply(context.params.event,{
content: 'hello!'
})

const interaction = require('autocode-discord-interaction')
await interaction.callback.command_reply(context.params.event,{
content: 'hello!'
},{ephemeral: true})

const interaction = require('autocode-discord-interaction')
await interaction.callback.command_defer(context.params.event)

Ephemeral thinking message also works.

FAQs
This npm makes it easy to use the discord interactions inside autocode.
The npm package autocode-discord-interaction receives a total of 4 weekly downloads. As such, autocode-discord-interaction popularity was classified as not popular.
We found that autocode-discord-interaction demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.