utilitas 1995.2.39 → 1995.2.40

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/lib/bot.mjs CHANGED
@@ -247,7 +247,7 @@ const subconscious = [{
247
247
  };
248
248
  ctx.er = async (m, opts) => {
249
249
  log(m);
250
- return await ctx.ok(m?.message || m, opts);
250
+ return await ctx.ok(`⚠️ ${m?.message || m}`, opts);
251
251
  };
252
252
  ctx.complete = async (options) => await ctx.ok('☑️', options);
253
253
  ctx.json = async (obj, options) => await ctx.ok(json(obj), options);
@@ -638,7 +638,7 @@ const subconscious = [{
638
638
  },
639
639
  }];
640
640
 
641
- const train = (bot, module, options) => {
641
+ const establish = (bot, module, options) => {
642
642
  if (!module.run) { return; }
643
643
  assert(module?.func, 'Skill function is required.', 500);
644
644
  bot._.skills[module.name || (module.name = uuidv4())] = {
@@ -653,7 +653,7 @@ const train = (bot, module, options) => {
653
653
  newCommand(command, module[sub][command])
654
654
  ));
655
655
  }
656
- log(`Training: ${module.name} (${module.priority})`, { force: true });
656
+ log(`Establishing: ${module.name} (${module.priority})`, { force: true });
657
657
  return bot.use(countKeys(module.cmds) && !module.cmdx ? async (ctx, next) => {
658
658
  for (let c in module.cmds) {
659
659
  if (insensitiveCompare(ctx.cmd?.cmd, c)) {
@@ -723,7 +723,7 @@ const init = async (options) => {
723
723
  }
724
724
  }
725
725
  mods.sort((x, y) => ~~x.priority - ~~y.priority).map(
726
- module => train(bot, module, options)
726
+ module => establish(bot, module, options)
727
727
  );
728
728
  assert(mods.length, 'Invalid skill set.', 501);
729
729
  parseArgs(); // Validate args options.
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.39",
4
+ "version": "1995.2.40",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.39",
4
+ "version": "1995.2.40",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",