Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

mtripg6666tdr/eris-command-resolver

Repository files navigation

⚠️ This library is no longer supported.

See #15 for more information.

Note: this package is mainly for my own use, but it might be useful if you use as needed

eris-command-resolver

npm

By using this package, both ComamndInteraction and Message will be resolved as unified CommandMessage and you can code with CommandMessage with no considering the way the command passed.
image

Therefore you can support Message-based-command and Interaction-based-command at once, without any verbose codes.

Examples

API

Represence the message or interaction that includes command.

  • createFromMessage(message: Message<TextChannel>, prefixLength?: number)
    Resolves message to CommandMessage.

  • createFromInteraction(interaction: CommandInteraction<TextableChannel>)
    Resolves message to CommandMessage.

  • reply(options: MessageOptions)
    Reply to the user.

Represence the message that is the reply to the CommandMessage.

  • edit(options: MessageContent)
    Edit the response message.

... and so on...

You can see the full api document here.

License

LICENSE

About

Message wrapper for eris to absorb the differences between Message and CommandMessage, including some helper classes

Resources

License

Stars

Watchers

Forks