ShahriarAbidbd/SmartifyXBotPublic · Bot Template

ProfileTelegram

Do Tasks Smartly with SmartifyX 😎

Utilityutilitydownloaderyoutubefacebookinstagramscreenshot
27 commands2 envUpdated 1mo agoCreated Jul 28, 2026
Back to folder

commands/_gem.js

javascript · 70 lines

Raw
1/**#command2name: /gem3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12async function getPrompt(Prompt) {13 14  let a = await Bot.sendMessage("*💭 Thinking..*")15  let mid = a.result.message_id16 17  await Api.editMessageText({18    chat_id: chat.id,19    message_id: mid,20    text: "*💭 Thinking...*",21    parse_mode: "markdown"22  })23 24 25  let res = await HTTP.get({26    url: "https://gemini-api-real-time.vercel.app/api/ask?prompt=" + encodeURIComponent(Prompt)27  })28 29  await Api.editMessageText({30    chat_id: chat.id,31    message_id: mid,32    text: "*💭 Thinking....*",33    parse_mode: "markdown"34  })35 36  if (!res.data.success) {37    await Api.editMessageText({38      chat_id: chat.id,39      message_id: mid,40      text: "*API Error.*",41      parse_mode: "markdown"42    })43    return44  }45 46  await Api.editMessageText({47    chat_id: chat.id,48    message_id: mid,49    text: "*Sending...*",50    parse_mode: "markdown"51  })52 53 54  await Api.call("editMessageText", {55    chat_id: chat.id,56    message_id: mid,57    rich_message: {58      markdown: res.data.response59    }60  });61}62 63/* command handler */64if (request.reply_to_message && request.reply_to_message.text) {65  getPrompt(request.reply_to_message.text)66} else if (params) {67  getPrompt(params)68} else {69  msg.reply("❗ Please provide a Prompt")70        }