@discommand/message-components

2.1.0 • Public • Published

@discommand/message-components

discommand plugin.

Using

alert! this is Pure ES Module.

  • stable version
npm i @discommand/message-components discommand
  • development version
npm i @discommand/message-components@next discommand

import { ComponentPlugin } from '@discommand/message-components'
import { DiscommandClient } from 'discommand'

const client = new DiscommandClient(
  {
    // ...
  },
  {
    // ...
    plugins: [
      new ComponentPlugin({
        directory: 'your_component_directory',
      }),
    ],
  }
)

client.login('your_token')

components/select.js

import { MessageComponents } from '@discommand/message-components'

export default class extends MessageComponents {
  constructor() {
    super('foo')
  }

  execute(interaction) {
    interaction.update({ content: 'bar', components: [] })
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @discommand/message-components

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

9.57 kB

Total Files

5

Last publish

Collaborators

  • migan