Good, as you like you can set Caption, But I need image also so must use this also Marge that and uodate it "// see all parameters in https://core.telegram.org/bots/api#sendphoto
Api.sendPhoto({
photo: "https://cataas.com/cat", // it is picture!
caption: "Test photo",
reply_markup: { inline_keyboard: [
// line 1
[
// open the link on button pressing
{ text: "button1", url: "http://example.com" },
// run command /onButton2 on button pressing
{ text: "button2", callback_data: "/onButton2" }
],
// line 2
[
// see all params in
// https://core.telegram.org/bots/api#inlinekeyboardbutton
{ text: "button3", callback_data: "/onButton3" }
]
]}
});" after here is my /joined command. Also update it with all the channel name "JunnioMarket, loootterahub, trickylooterz, DiscussionxGroup" Here is /joind command set all the channel name and according like do "if(!content){
var url = "https://api.teleservices.io/Membership/"
var channel = ["@Teleservices_Api","Teleservices_Bots"]; // Your channel's username with or without "@"
var token = bot.token;
HTTP.get({
url:
""+url+"?bot_token=" +token +"&user_id=" +
user.telegramid +
"&chat_id=" +
channel +
"",
success: "/joined"
});
}
else{
var data = JSON.parse(content);
var status = data.status;
var isJoined = data.is_joined;
if (status === "true") {
if (isJoined === true) {
Bot.sendMessage("Thanks For Joining All Channels✅");
Bot.runCommand("/main") //Your Command runAfter joining all channel
} else {
if (data.not_joined_chat && data.not_joined_chat.length > 0) {
let channels = data.not_joined_chat.map(chat => `@${chat}`).join(', ')
if (request.data) {
Api.answerCallbackQuery({
callback_query_id: request.id,
text: `❌ Must Join Channel To Use Bot 🤖 ${channels}`,
parse_mode: "html",
show_alert: true
});
}
} else {
Bot.sendMessage("No channels to join or an error occurred.");
}
}
} else {
Bot.sendMessage("Invalid response status.");
}}"
Comments
Post a Comment