Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

disapp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disapp

An intuitive Discord app framework

latest
Source
npmnpm
Version
14.14.1-1.1.0
Version published
Maintainers
1
Created
Source

DisApp

An intuitive Discord framework

bun add disapp
npm add disapp
pnpm add disapp
yarn add disapp

Quick Start

// src/index.js
import { DisClient, GatewayIntentBits } from "disapp";

const client = new DisClient({
  intents: [GatewayIntentBits.Guilds],
});

await client.setupCommands("src/commands/*.js");
await client.setupEvents("src/events/*.js");

await client.login("DISCORD_APP_TOKEN");

Example command

// src/commands/ping.js
import { DisCommand } from "disapp";

export default new DisCommand()
  .setName("ping")
  .setDescription("See the application's ping")
  .setExecutable(async (interaction) => {
    await interaction.reply(`${interaction.client.ws.ping}`);
  });

Example event

// src/events/ready.js
import { DisEvent } from "disapp";

export default new DisEvent("ready", (client) => {
  console.log(`Logged as ${client.user.username}`);
});

License

Refer to the LICENSE.

Keywords

discord

FAQs

Package last updated on 15 Jan 2024

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