
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@gcommands/expressinteraction
Advanced tools
Install with npm / yarn / pnpm:
npm install @gcommands/expressinteraction
yarn add @gcommands/expressinteraction
pnpm add @gcommands/expressinteraction
You go to your bot at https://discord.com/developers and copy the publicKey which you then put into the clientPublicKey parameter. In the Interaction Endpoint Url you put your site url and to that endpoint which you then put in the interactionEnpoint parameter, for example /interactions so in the discord panel you put https://example.com/interactions.
You can receive interactions via the GExpressInteraction event
// Without CMD Handler
const { GExpressInteraction } = require("@gcommands/expressinteraction");
let g = new GExpressInteraction({
interactionEndpoint: "/interactions", // Interactions Endpoint URL
clientPublicKey: process.env.publicKey, // Public Key from https://discord.com/developer/applications/:ID/information
port: 3e3 // express port
})
g.on("GExpressInteraction", (interaction) => {
if(interaction.isCommand()) {
interaction.send("po") // https://gcommands.js.org/docs/#/docs/main/main/typedef/GPayloadOptions
}
})
// With CMD Handler
const { GExpressInteraction } = require("@gcommands/expressinteraction");
let g = new GExpressInteraction({
cmdDir: "cmds/",
interactionEndpoint: "/interactions", // Interactions Endpoint URL
clientPublicKey: process.env.publicKey, // Public Key from https://discord.com/developer/applications/:ID/information
port: 3e3 // express port
})
If you want a straight cmd handler, you can create for example test.js in cmds/ and put it there:
const { Command } = require("@gcommands/expressinteraction")
module.exports = class extends Command {
constructor(...args) {
super(...args, {
name: "test"
})
}
run({respond}, arrayArgs, args) {
respond("hello")
}
}
To create a slash command, go to panel. GExpressInteraction is used only for the handle.
FAQs
Express Interaction Handler
The npm package @gcommands/expressinteraction receives a total of 0 weekly downloads. As such, @gcommands/expressinteraction popularity was classified as not popular.
We found that @gcommands/expressinteraction 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.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.