1.1.2 • Published 4 months ago

discordbox v1.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

npm CodeFactor GitHub License

📦 Install

npm install discordbox

🚀 Getting started

The following example shows how to create and start a bot that registers a slash command called ping that replies with Pong! when used.

import { SlashCommandBuilder } from 'discord.js'
import { DiscordBot } from 'discordbox'

const bot = new DiscordBot({
  token: 'xxxxxxxxxxxxxxxxxx',
  guildId: 'xxxxxxxxxxxxxxxxxx',
  clientId: 'xxxxxxxxxxxxxxxxxx',
  supportUserId: 'xxxxxxxxxxxxxxxxxx',
})

const ping = {
  action: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('sends Pong!'),

  callback: async (interaction) => {
    await interaction.reply({ content: 'Pong!', ephemeral: true })
  },
}

bot.addGenericInteractions([ping])

await bot.start()

📖 Documentation

You can find the full documentation on docs.discordbox.app.

✨ Contributing

Contributions are welcome, feel free to open an issue or submit a pull request.

🔑 License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

1.1.2

4 months ago

1.1.1

1 year ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago