You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP →
Socket
Book a DemoInstallSign in
Socket

disgroove

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disgroove

A module to interface with Discord

2.2.6
latest
Source
npmnpm
Version published
Weekly downloads
99
16.47%
Maintainers
1
Weekly downloads
 
Created
Source

disgroove

A module to interface with Discord

  • Fast
  • Lightweight
  • Flexible
  • 100% coverage of the Official Discord API Documentation

Example

const {
  Client,
  GatewayIntents,
  InteractionType,
  InteractionCallbackType,
  MessageFlags,
} = require("disgroove");
const client = new Client("B0t.T0k3N");

client.once("ready", () => {
  console.log("Logged in as", client.user.username);

  client.createGlobalApplicationCommand(client.application.id, {
    name: "ping",
    description: "Pong!",
  });
});

client.on("interactionCreate", async (interaction) => {
  if (interaction.type !== InteractionType.ApplicationCommand) return;

  if (interaction.data.name === "ping") {
    client.createInteractionResponse(interaction.id, interaction.token, {
      type: InteractionCallbackType.ChannelMessageWithSource,
      data: {
        content: "Pong! 🏓",
        flags: MessageFlags.Ephemeral,
      },
    });
  }
});

client.connect();

More examples on the GitHub repository

Keywords

api

FAQs

Package last updated on 15 Jul 2025

Did you know?

Socket

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.

Install

Related posts