seedcord 0.8.0 → 0.9.0

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
@@ -1273,12 +1273,13 @@ var EmojiInjector = class {
1273
1273
  if (emoji) {
1274
1274
  emojiStorage[key] = `<${emoji.identifier}>`;
1275
1275
  foundCount++;
1276
+ this.logger.debug(`${chalk3__default.default.bold.green("Found")}: ${chalk3__default.default.magenta.bold(emojiName)} (${emoji.id})`);
1276
1277
  return;
1277
1278
  }
1278
1279
  emojiStorage[key] = emojiName;
1279
1280
  this.logger.warn(`${chalk3__default.default.bold.yellow("Missing")}: ${chalk3__default.default.magenta.bold(emojiName)} (using configured value)`);
1280
1281
  });
1281
- this.logger.info(`${chalk3__default.default.bold.green("Loaded")}: ${chalk3__default.default.magenta.bold(foundCount)} emojis`);
1282
+ this.logger.info(`${chalk3__default.default.bold.green("Loaded")}: ${chalk3__default.default.magenta.bold(foundCount)} emoji(s)`);
1282
1283
  }
1283
1284
  clearEmojis() {
1284
1285
  for (const key of Object.keys(emojiStorage)) Reflect.deleteProperty(emojiStorage, key);
@@ -1737,8 +1738,10 @@ function Checkable(ctor) {
1737
1738
  };
1738
1739
  }
1739
1740
  __name(Checkable, "Checkable");
1740
- function EventCatchable(log) {
1741
+ function EventCatchable(options) {
1741
1742
  return function(_target, _prop, descriptor) {
1743
+ const log = options?.log ?? false;
1744
+ const silent = options?.silent ?? false;
1742
1745
  const original = descriptor.value;
1743
1746
  descriptor.value = async function(...args) {
1744
1747
  if (!original) throw new services.SeedcordError(services.SeedcordErrorCode.DecoratorMethodNotFound);
@@ -1748,6 +1751,10 @@ function EventCatchable(log) {
1748
1751
  if (!(err instanceof Error)) throw err;
1749
1752
  this.setErrored();
1750
1753
  if (log) console.error(err);
1754
+ if (typeof silent === "boolean" && silent) return;
1755
+ if (typeof silent !== "boolean" && silent.some((errorType) => err instanceof errorType)) {
1756
+ return;
1757
+ }
1751
1758
  const eventArgs = Array.isArray(this.getEvent()) ? this.getEvent() : [
1752
1759
  this.getEvent()
1753
1760
  ];