Skip to main content

npm

Source

Description

The shared commands used for Star Network’s HTTP-only bots.

Setup

  • Define locales/{{lng}}/commands/shared:infoEmbedDescription as a string. This is the content displayed in /info’s embed description.
  • Define the information variables.
  • Importing @wolfstar/shared-http-pieces/register registers a preGenericsInitialization hook that adds this package’s bundled locales and commands/shared namespace to your Client’s i18n configuration automatically, while retaining the consumer’s own locale path and namespaces. As long as it’s imported before new Client(...), no manual wiring is required. The resolved path is also exported as localesPath, if you need it directly.

Usage

You can either register after setting environment parameters:
Or import its utilities as well as registering:
Furthermore, error handling can be enabled by setting the SENTRY_DSN, @wolfstar/shared-http-pieces includes a way to register Sentry and registers handlers to handle errors into Sentry. The plugin also reads SENTRY_ROOT to set RewriteFrames’s root, defaults to process.cwd().