Detalhes do pacote

@sapphire/decorators

sapphiredev9.3kMIT6.2.0

Useful TypeScript decorators for Sapphire Framework Discord bots

sapphiredev, bot, typescript, ts

readme (leia-me)

Sapphire Logo # Sapphire Utilities Common NodeJS packages for Sapphire Repositories and others. GitHub Packages npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm

Buy us some doughnuts

Sapphire Community is and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!

We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.

Donate With Address
Open Collective Click Here
Ko-fi Click Here
Patreon Click Here
PayPal Click Here

Contributors

Please make sure to read the Contributing Guide before making a pull request.

Thank you to all the people who already contributed to Sapphire!

changelog (log de mudanças)

Changelog

All notable changes to this project will be documented in this file.

@sapphire/decorators@6.2.0 - (2025-06-11)

🐛 Bug Fixes

  • deps: Update all non-major dependencies (4bc5591) (#879 by @renovate[bot])
  • deps: Update all non-major dependencies (bc2f01c) (#869 by @renovate[bot])

🚀 Features

  • decorators: Register application commands decorators (da07d09) (#877 by @yuansheng1549)

@sapphire/decorators@6.1.1 - (2024-11-02)

🏠 Refactor

  • Resolve several sonar issues (ba915f9) (#823 by @favna)

🐛 Bug Fixes

  • deps: Update all non-major dependencies (083376a) (#763 by @renovate[bot])
  • deps: Update all non-major dependencies (e7fdc5d) (#752 by @renovate[bot])

📝 Documentation

  • decorator: Fix tsdoc comments (97dd5ac)

@sapphire/decorators@6.1.0 - (2024-03-17)

🚀 Features

  • Add-interaction-support-to-decorators (#725) (c166ac6)

@sapphire/decorators@6.0.4 - (2024-01-19)

🐛 Bug Fixes

  • Fixed commonjs typings export mapping (#707) (216ff02)

@sapphire/decorators@6.0.3 - (2023-12-04)

🐛 Bug Fixes

  • decorators: Properly split CJS and ESM (2326c11)
  • Update export mapping for proper ESM/CJS split (dd0cff8)

@sapphire/decorators@6.0.2 - (2023-07-21)

🐛 Bug Fixes

  • deps: Update all non-major dependencies (#607) (9cc8bd0)

🧪 Testing

  • Update vitest to coverage v8 (a4bc6e4)

@sapphire/decorators@6.0.1 - (2023-04-10)

🐛 Bug Fixes

  • decorators: Add missing type modifiers (2f49bbb)
  • deps: Update all non-major dependencies (#577) (291dd67)
  • deps: Update all non-major dependencies (#545) (40ca040)
  • deps: Update all non-major dependencies (#544) (cc78f17)

🧪 Testing

@sapphire/decorators@6.0.0 - (2023-01-08)

🚀 Features

  • deps: Support for djs v14 (#434) (2e2c3e9)

@sapphire/decorators@5.0.0 - (2022-08-20)

🐛 Bug Fixes

  • Manually set version to 5.0.0 to cover @sapphire/framework@3.0.0 (48e083f)
  • deps: Update all non-major dependencies (2308bd7)

📝 Documentation

  • Add @muchnameless as a contributor (a1221fe)
  • Add @enxg as a contributor (d2382f0)
  • Add @EvolutionX-10 as a contributor (efc3a32)

@sapphire/decorators@4.3.7 - (2022-07-13)

🏠 Refactor

  • Change const enum for regular enum (#394) (960e973)

🐛 Bug Fixes

  • deps: Update all non-major dependencies (84af0db)

🧪 Testing

  • Migrate to vitest (#380) (075ec73)

@sapphire/decorators@4.3.5 - (2022-06-10)

🐛 Bug Fixes

  • deps: Update all non-major dependencies (50cd8de)

📝 Documentation

  • Add @MajesticString as a contributor (295b3e9)
  • Add @Mzato0001 as a contributor (c790ef2)
  • Add @NotKaskus as a contributor (00da8f1)
  • Add @imranbarbhuiya as a contributor (fb674c2)
  • Add @axisiscool as a contributor (ce1aa31)
  • Add @dhruv-kaushikk as a contributor (ebbf43f)
  • Add @Commandtechno as a contributor (f1d69fa)
  • Fix typedoc causing OOM crashes (63ba41c)

4.3.4 (2022-04-01)

Note: Version bump only for package @sapphire/decorators

4.3.3 (2022-03-20)

Note: Version bump only for package @sapphire/decorators

4.3.2 (2022-03-20)

Note: Version bump only for package @sapphire/decorators

4.3.1 (2022-03-11)

Note: Version bump only for package @sapphire/decorators

4.3.0 (2022-03-06)

Features

4.2.6 (2022-03-01)

Note: Version bump only for package @sapphire/decorators

4.2.5 (2022-02-18)

Note: Version bump only for package @sapphire/decorators

4.2.4 (2022-02-15)

Note: Version bump only for package @sapphire/decorators

4.2.3 (2022-02-11)

Note: Version bump only for package @sapphire/decorators

4.2.2 (2022-02-07)

Note: Version bump only for package @sapphire/decorators

4.2.1 (2022-02-06)

Note: Version bump only for package @sapphire/decorators

4.2.0 (2022-02-03)

Features

  • ts-config: add multi-config structure (#281) (b5191d7)

4.1.0 (2022-01-28)

Features

4.0.2 (2022-01-21)

Note: Version bump only for package @sapphire/decorators

4.0.1 (2022-01-21)

Note: Version bump only for package @sapphire/decorators

4.0.0 (2022-01-16)

Features

  • decorators: add container to ApplyOptions callback (#258) (d2876b8)
  • decorators: remove enumerable and enumerableMethod. Use their PascalCased variants instead. (38e2977)

BREAKING CHANGES

  • decorators: The previously deprecated enumerableandenumerableMethod` decorators have been removed. Use their PascalCased variants instead.
  • decorators: When using @ApplyOptions with a callback function, the single parameter of PieceContex been changed to an object, which also has a property of Container. Migration change is @ApplyOptions<Listener.Options>(({ context }) => ({

3.1.6 (2022-01-12)

Note: Version bump only for package @sapphire/decorators

3.1.5 (2022-01-10)

Note: Version bump only for package @sapphire/decorators

3.1.4 (2021-11-06)

Note: Version bump only for package @sapphire/decorators

3.1.3 (2021-10-26)

Bug Fixes

  • docs: replace command usage of run to messageRun (#204) (8279ec0)

3.1.2 (2021-10-17)

Bug Fixes

  • allow more node & npm versions in engines field (5977d2a)

3.1.1 (2021-10-11)

Note: Version bump only for package @sapphire/decorators

3.1.0 (2021-10-10)

Note: Version bump only for package @sapphire/decorators

3.0.1 (2021-10-08)

Bug Fixes

  • decorators: properly run postbuild scripts (b71b7a5)

3.0.0 (2021-10-04)

Bug Fixes

  • discord.js-utilities: fixed permission error messages grammar (ea9840b)

Features

  • decorators: add RequiresUserPermissions (688e39f)
  • decorators: add default messages to errors thrown by RequiresPermissions (13d89a3)
  • decorators: set minimum NodeJS to v14 (46c0f68)

BREAKING CHANGES

  • decorators: RequiresPermissions has been renamed to RequiresClientPermissions
  • decorators: enum entry DecoratorIdentifiers.RequiresPermissionsGuildOnly has been changed to DecoratorIdentifiers.RequiresClientPermissionsGuildOnly
  • decorators: enum entry DecoratorIdentifiers.RequiresPermissionsMissingPermissions has been changed to DecoratorIdentifiers.RequiresClientPermissionsMissingPermissions
  • decorators: i18n identifier requiresPermissionsGuildOnly has been changed to requiresClientPermissionsGuildOnly
  • decorators: i18n identifier requiresPermissionsMissingPermissions has been changed to requiresClientPermissionsMissingPermissions

2.2.0 (2021-07-20)

Features

  • decorators: add new permission decorators (#138) (60ab0ca)

2.1.5 (2021-06-27)

Note: Version bump only for package @sapphire/decorators

2.1.4 (2021-06-19)

Bug Fixes

  • docs: update-tsdoc-for-vscode-may-2021 (#126) (f8581bf)

2.1.3 (2021-06-06)

Bug Fixes

  • remove peer deps, update dev deps, update READMEs (#124) (67256ed)

2.1.2 (2021-05-20)

Bug Fixes

  • decorators: mark package as side effect free (d42dadf)

2.1.1 (2021-05-02)

Bug Fixes

  • drop the www. from the SapphireJS URL (494d89f)
  • update all the SapphireJS URLs from .com to .dev (f59b46d)

2.1.0 (2021-04-21)

Features

2.0.10 (2021-04-19)

Bug Fixes

  • change all Sapphire URLs from "project"->"community" & use our domain where applicable 👨‍🌾🚜 (#102) (835b408)

2.0.9 (2021-04-03)

Note: Version bump only for package @sapphire/decorators

2.0.8 (2021-03-16)

Bug Fixes

  • decorators: bump framework dependency to v1.0.0 (33dc61d)

2.0.7 (2021-03-16)

Bug Fixes

  • decorators: add tslib dependency (3085f1d)

2.0.6 (2021-03-16)

Note: Version bump only for package @sapphire/decorators

2.0.5 (2021-02-22)

Bug Fixes

  • decorators: clean up required peer dependencies (b29e8a7)

2.0.4 (2021-02-16)

Note: Version bump only for package @sapphire/decorators

2.0.3 (2021-01-18)

Bug Fixes

  • decorators: change ApplyOptions's callback parameter from Client to PieceContext (#61) (d8b916b)

2.0.2 (2021-01-16)

Note: Version bump only for package @sapphire/decorators

2.0.1 (2021-01-09)

Bug Fixes

  • decorators: assign proper homepage url in package (495fffc)

2.0.0 (2021-01-08)

Features

  • {ts,eslint}-config,decorators: remove TypeScript v3 from peer dependencies (a211f0b)

BREAKING CHANGES

  • {ts,eslint}-config,decorators: TypeScript v3 removed from peer dependencies, it may still work, however we strongly recommend updating.

1.2.1 (2021-01-01)

Note: Version bump only for package @sapphire/decorators

1.2.0 (2020-12-26)

Bug Fixes

  • utilities,time-utilities: set published versions of dependencies in peerDependencies (adee6fc)

Features

  • decorators: add createFunctionPrecondition, fixed build (#51) (c87d5db)

1.1.0 (2020-12-22)

Features

1.0.3 (2020-11-04)

Bug Fixes

  • decorators: properly specify ESM and CommonJS exports (8bf3ec7)

1.0.2 (2020-10-11)

Note: Version bump only for package @sapphire/decorators

1.0.1 (2020-09-20)

Note: Version bump only for package @sapphire/decorators

1.0.0 (2020-09-05)

Features

  • decorators: add enumerableMethod decorator (aa60625)
  • implement snowflake (5ba4e2d)
  • decorators: add decorators package (#4) (677b3e5)
  • decorators: add enumerable decorator (cbdd445)

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.3.0 (2020-07-26)

Features

  • rename master branch to main (ea05734)

2.2.0 (2020-07-02)

Features

  • allow ApplyOptions to take a function (#24) (cbcabdc)
  • apply-options: add extendables support (#26) (39421bb)

2.1.2 (2020-06-14)

Bug Fixes

  • core: properly pass rest options for ApplyOptions (e7c68d2)

2.1.1 (2020-06-14)

Bug Fixes

  • remove unnecessary optional chain (bd7f3ec)

2.1.0 (2020-06-13)

Features

  • add CreateResolvers & requiredPermissions decorators (3bdc4bd)

2.0.0 (2020-05-30)

⚠ BREAKING CHANGES

  • NodeJS version 12 is no longer supported. Install NodeJS 14 or higher.
  • Discord.JS is no longer supported. This library now targets @klasa/core and the new klasa

Features

  • rework to using @klasa/core and the new klasa (5100e86)

Bug Fixes

  • target NodeJS version 14 and higher (a678765)

1.0.0 (2020-03-01)

Features