mahdiyar30301/ZorenixAI_botPublic · Bot Template

Not Bot Is Hacking You 🤣🤩

Utilityutility
ProfileTelegram
455 commands2 envUpdated 6h agoCreated Aug 26, 2026
Back to folder

commands/mood_boost.js

javascript · 44 lines

Raw
1/**#command2name: mood_boost3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// کامند: mood_boost13try {14  var uid = "";15  if (typeof user !== "undefined" && user) {16    if (user.telegramid) uid = String(user.telegramid);17    else if (user.id) uid = String(user.id);18  }19  var chatId = uid;20  if (typeof chat !== "undefined" && chat) {21    if (chat.chatid) chatId = chat.chatid;22    else if (chat.id) chatId = chat.id;23  }24  await db.global.set("last_ask_uid_" + chatId, uid);25  await db.global.set("last_status_" + uid, "🌤️ مود");26  await db.global.set("last_user_prompt_" + uid, "mood: نیاز به انگیزه و انرژی");27  try { Api.sendChatAction({ chat_id: chatId, action: "typing" }); } catch (e) {}28  HTTP.post({29    url: "https://api.groq.com/openai/v1/chat/completions",30    headers: { "Authorization": "Bearer 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" },31    body: {32      model: "openai/gpt-oss-20b",33      messages: [34        { role: "system", content: "همراه همدل کوتاه‌گوی فارسی هستی (نه پزشک). همدلی کوتاه + یک تمرین ۳۰ تا ۹۰ ثانیه‌ای + یک جمله. گرم و واقعی." },35        { role: "user", content: "حال کاربر: نیاز به انگیزه و انرژی" }36      ]37    },38    background: true,39    success: "/onAiSuccess",40    error: "/onAiError"41  });42} catch (e) {43  Bot.sendMessage("⚠️ خطا mood:\n" + String(e && e.message ? e.message : e));44}