seedcord 0.8.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1738,8 +1738,10 @@ function Checkable(ctor) {
1738
1738
  };
1739
1739
  }
1740
1740
  __name(Checkable, "Checkable");
1741
- function EventCatchable(log) {
1741
+ function EventCatchable(options) {
1742
1742
  return function(_target, _prop, descriptor) {
1743
+ const log = options?.log ?? false;
1744
+ const silent = options?.silent ?? false;
1743
1745
  const original = descriptor.value;
1744
1746
  descriptor.value = async function(...args) {
1745
1747
  if (!original) throw new services.SeedcordError(services.SeedcordErrorCode.DecoratorMethodNotFound);
@@ -1754,6 +1756,10 @@ function EventCatchable(log) {
1754
1756
  ];
1755
1757
  const msg = eventArgs.find((x) => x instanceof discord_js.Message);
1756
1758
  const { response } = extractErrorResponse(err, this.core, msg?.guild ?? null, msg?.author ?? null, eventArgs);
1759
+ if (typeof silent === "boolean" && silent) return;
1760
+ if (typeof silent !== "boolean" && silent.some((errorType) => err instanceof errorType)) {
1761
+ return;
1762
+ }
1757
1763
  if (!msg) return;
1758
1764
  await msg.reply({
1759
1765
  embeds: [