1.2.4 • Published 3 years ago

discord-slash-commands v1.2.4

Weekly downloads
105
License
MIT
Repository
-
Last release
3 years ago

discord-slash-commands

Slash commands for Discord

Installation

npm i discord-slash-commands

Features

  • Customizable
  • Multiple commands support
  • Per-guild commands support

Example

const Discord = require('discord.js');
const client = new Discord.Client();

const { Slash } = require('discord-slash-commands');
const slash = new Slash(client);

client.on("ready", () => {
    console.log("Ready");
    
    const em = new Discord.MessageEmbed()
    .setTitle("Test");

    slash.command({
        guildOnly: true,
        guildID: "GUILD_ID",
        data: {
            name: "ping",
            description: "Ping pong?",
            type: 4,
            content: `Pong! \`${client.ws.ping}ms\``
        }
    })
    slash.command({
        guildOnly: true,
        guildID: "GUILD_ID",
        ephemeral: true,
        data: {
            name: "ephemeral",
            description: "Send an ephemeral message",
            type: 4,
            content: `Hey!`
        }
    })
    slash.command({
        guildOnly: true,
        guildID: "GUILD_ID",
        data: {
            name: "embed",
            description: "Send an embed",
            type: 4,
            content: `Hey!`,
            embeds: [em]
        }
    })
})

client.login("TOKEN");

Need help? Join the Support Server

© shadeoxide | Shade's Workshop - 2020

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.0.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago