@langitdeveloper/baileys 2.2.1 → 2.2.2

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.
@@ -429,12 +429,18 @@ const makeBotToolkit = (conn, logger) => {
429
429
  }
430
430
  rateLimitBuckets.set(bucketKey, now);
431
431
  return false;
432
- }
433
-
432
+ },
433
+ /**
434
+ * dispatcher (e.g. `.aimahiru`) - this function only does the actual
435
+ * call + prompt shaping, not command parsing.
436
+ *
437
+ * @param input.errorText the error/stack trace the user is hitting
438
+ * @param input.code the snippet of their bot code, if any
439
+ */
434
440
  async aiMahiru({ errorText, code, apiKey, model = 'claude-haiku-4-5-20251001' }) {
435
- const key = apiKey || process.env.ANTHROPIC_API_KEY;
441
+ const key = apiKey || process.env.api_key;
436
442
  if (!key) {
437
- throw new Error('aiMahiru: no Anthropic API key provided (pass apiKey or set ANTHROPIC_API_KEY)');
443
+ throw new Error('aiMahiru: no Anthropic API key provided (pass apiKey or set api_key)');
438
444
  }
439
445
  const promptParts = [
440
446
  'Kamu adalah Mahiru, asisten debug buat fork Baileys bernama mahiru-bails/@langitdeveloper.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langitdeveloper/baileys",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "WhatsApp API Modification By Langit",
5
5
  "keywords": [
6
6
  "whatsapp",