adityajat/SaarvamAI_botPublic · Bot Template

ProfileTelegram

AISarvam AI is a multi‑purpose Telegram bot that lets users ask questions, get explanations, convert text to speech, and translate messages using the Sarvam AI API. It also offers group administration commands such as warn, mute, ban, pin, delete, and announcements, and can clear personal or group AI memory. The bot uses the TeleBotHost TBL framework with Bot, Api, db, and HTTP calls, and provides inline keyboards for language and voice selection.

Ai Assistantaivoicetranslatemoderationadminsarvam
34 commands4 envUpdated 15d agoCreated Sep 14, 2026
Back to folder

commands/_help.js

javascript · 133 lines

Raw
1/**#command2name: /help3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================13// /help14// ==========================================15 16if (!isGroupChatNow()) {17 18  await Api.sendMessage({19    text:20      "📚 SARVAM AI COMMAND CENTER\n\n" +21 22      "🤖 AI — USERS + ADMINS\n" +23      "/ask <question>\n" +24      "Ask Sarvam a question.\n\n" +25 26      "/explain <topic>\n" +27      "Ask Sarvam to explain something.\n\n" +28 29      "🧠 MEMORY\n" +30      "/forget\n" +31      "Delete your personal AI conversation memory.\n\n" +32 33      "🔊 VOICE\n" +34      "/voice <text>\n" +35      "Choose language + speaker and generate speech.\n\n" +36 37      "🌐 LANGUAGE\n" +38      "/translate\n" +39      "Open translation tools.\n\n" +40 41      "👑 OWNER\n" +42      "/owner\n" +43      "Shows the bot owner.\n\n" +44 45      "🛡️ GROUP ADMIN COMMANDS\n" +46      "/warn — warn a member\n" +47      "/warnings — view warnings\n" +48      "/resetwarn — reset warnings\n" +49      "/mute — temporary mute\n" +50      "/unmute — remove mute\n" +51      "/ban — ban member\n" +52      "/unban <user_id> — unban member\n" +53      "/pin — pin replied message\n" +54      "/unpin — unpin replied/latest pinned message\n" +55      "/delete — delete replied message\n" +56      "/announce — announcement\n" +57      "/tag — tag replied member\n" +58      "/tagall — tag members seen by the bot\n" +59      "/automod on/off — automatic moderation\n" +60      "/clearmemory — clear group's AI memory\n\n" +61 62      "💡 Tip:\n" +63      "In groups, mention me or reply to my message.\n\n" +64 65      "⚠️ Admin commands work only when the sender is a real Telegram administrator or an anonymous administrator."66  });67 68  return;69}70 71 72let admin =73  await callerIsAdmin();74 75 76if (admin) {77 78  await Api.sendMessage({79    text:80      "📚 GROUP COMMANDS — ADMIN\n\n" +81 82      "🤖 AI — EVERYONE\n" +83      "Just mention me or reply to me.\n" +84      "/ask\n" +85      "/explain\n" +86      "/voice\n" +87      "/translate\n" +88      "/forget\n" +89      "/owner\n\n" +90 91      "🛡️ ADMIN ONLY\n" +92      "/warn — reply to a member\n" +93      "/warnings — reply to a member\n" +94      "/resetwarn — reply to a member\n" +95      "/mute 10m — reply to a member\n" +96      "/unmute — reply to a member\n" +97      "/ban — reply to a member\n" +98      "/unban <user_id>\n" +99      "/pin — reply to a message\n" +100      "/unpin — reply or leave blank\n" +101      "/delete — reply to a message\n" +102      "/announce <text>\n" +103      "/tag — reply to a member\n" +104      "/tagall\n" +105      "/automod on\n" +106      "/automod off\n" +107      "/clearmemory\n\n" +108 109      "👑 You have full access to the above admin tools.\n\n" +110      "Anonymous administrators are supported."111  });112 113  return;114}115 116 117await Api.sendMessage({118  text:119    "📚 GROUP COMMANDS — MEMBER\n\n" +120 121    "🤖 AI\n" +122    "Mention me or reply to me to continue a conversation.\n\n" +123 124    "/voice — voice generation\n" +125    "/translate — translation tools\n" +126    "/forget — clear your personal AI memory\n" +127    "/owner — see the owner\n\n" +128 129    "🛡️ ADMIN TOOLS\n" +130    "Group moderation commands are restricted to Telegram administrators.\n\n" +131 132    "💡 Reply to my message and continue talking — I will use the previous conversation as context."133});