Goddy group
1 subscriber
14 photos
7 links
Download Telegram
Forwarded from Goddy BJS
Text To Image( Captcha ) BJs With Api

Command- /text
Answer- Send me your text
Wait for answer- on

BJS-
var userText = encodeURIComponent(message);  
var captchaUrl = "https://dummyimage.com/600x200/000/fff.png&text=" + userText;

Api.sendPhoto({
photo: captchaUrl,
chat_id: user.telegramid,
caption: "Here is your CAPTCHA!",
on_result: "onPhotoSent",
error: "onError"
});
Forwarded from Goddy BJS
5 reactions for this code✍️
Forwarded from Goddy BJS
Goddy BJS
Who need this code? 5 reactions and I would drop it❤️
Command- /add

Bjs-

Bot.sendMessage("Enter User IDs (comma separated)");

var key = "1399031414"; // Edit your id
if (user.telegramid == key) {
Bot.runCommand("/addbal2");
} else {
return;
}


Command- /addbal2
Wait for answer- on

let input = message;
let userIds = input.split(",").map(id => id.trim());
User.setProperty("userIds", userIds, "json");
Bot.sendMessage("How much do you want to add?");
Bot.runCommand("/bb");


Command- /bb
Wait for answer- on

var key = "1399031414"; // Edit your id
if (user.telegramid == key) {
let amount = parseFloat(message);
if (isNaN(amount)) {
Bot.sendMessage("Please enter a valid number for the amount.");
return;
}

let userIds = User.getProperty("userIds");
if (!userIds || userIds.length === 0) {
Bot.sendMessage("No user IDs found. Please run /add again.");
return;
}

userIds.forEach(function(tgid) {
let res = Libs.ResourcesLib.anotherUserRes("balance", tgid);
res.add(amount);
Bot.sendMessage("*Succesfully Added Balance* \n*👤 User = " + tgid + "\n💰 Amount= " + amount + "*");
});

User.setProperty("userIds", null);
} else {
return;
}
Forwarded from Goddy BJS
3 reactions for this✍️
Forwarded from Goddy BJS
Command - /age

Bjs-

var birthdate = new Date(params); // Birthdate provided by the user
if (isNaN(birthdate)) {
Bot.sendMessage("Please provide a valid birthdate in the format YYYY-MM-DD.");
return;
}

var today = new Date();
var age = today.getFullYear() - birthdate.getFullYear();
var monthDiff = today.getMonth() - birthdate.getMonth();

if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthdate.getDate())) {
age--;
}

Bot.sendMessage("You are " + age + " years old.");
Forwarded from Goddy BJS
Goddy BJS
5 reactions for this code✍️
Don’t forget this✍️
Forwarded from Goddy BJS
Command - Any Command


var commands = [
{ command: "/start", description: "Restart Bot" },
{
command: "/mainmenu",
description: "Redirect to Menu"
}
]

HTTP.post({
url: "https://api.telegram.org/bot" + bot.token + "/setMyCommands",
body: {
commands: commands,
scope: { 'type': "default" }
},
headers: { "Content-type": "application/json" }
})
Bot.sendMessage("Done")
Forwarded from Goddy BJS
Details- This code lists the group admins in a particular group

Bjs-

Command- /list

Api.getChatAdministrators({
chat_id: chat.chatid,
on_result: "/onAdminsReceived"
});


Command- /onAdminsReceived

var admins = options.result;
var adminList = "Group Administrators:\n";

for (var i = 0; i < admins.length; i++) {
var admin = admins[i].user;
adminList += "• " + admin.first_name;
if (admin.username) {
adminList += " (@" + admin.username + ")";
}
adminList += "\n";
}

Bot.sendMessage(adminList);
Forwarded from Goddy BJS
Name Detector Bjs

Command- *


var userId = user.telegramid;
var currentName = user.first_name;

var storedName = Bot.getProperty("name_" + userId);

if (storedName && storedName !== currentName) {
Bot.sendMessage("🔔 User " + userId + " has changed their name from '" + storedName + "' to '" + currentName + "'.");

Bot.setProperty("name_" + userId, currentName);
} else if (!storedName) {
Bot.setProperty("name_" + userId, currentName);
}
Forwarded from Goddy BJS
Command- Any Command


var telegramId = user.telegramid;
var firstName = user.first_name;
var lastName = user.last_name ? user.last_name : "N/A";
var username = user.username ? "@" + user.username : "N/A";
var languageCode = user.language_code ? user.language_code : "N/A";

var message = "🧑 *Your Telegram Account Information:*\n\n";
message += "👤 *Telegram ID*: `" + telegramId + "`\n";
message += "📛 *First Name*: " + firstName + "\n";
message += "📛 *Last Name*: " + lastName + "\n";
message += "👥 *Username*: " + username + "\n";
message += "🌐 *Language*: " + languageCode + "\n";

Bot.sendMessage(message, { parse_mode: "Markdown" });
Forwarded from Goddy BJS
Goddy BJS
5 reactions for this code✍️
Don’t forget this✍️
Forwarded from Goddy BJS
Goddy BJS
5 reactions for this code✍️
Command - /time

Bjs-


var currentDate = new Date();

var day = currentDate.getDate();
var month = currentDate.getMonth() + 1; // Months are 0-indexed
var year = currentDate.getFullYear();
var weekday = currentDate.toLocaleString('en-US', { weekday: 'long' });
var hours = currentDate.getHours();
var minutes = currentDate.getMinutes();
var seconds = currentDate.getSeconds();
var milliseconds = currentDate.getMilliseconds();

var formattedDate = day + "/" + month + "/" + year;
var formattedTime = hours + ":" + (minutes < 10 ? "0" : "") + minutes + ":" + (seconds < 10 ? "0" : "") + seconds;

var timezone = "Asia/Kolkata"; // Example timezone, replace as needed

// Week number calculation
function getWeekNumber(date) {
var firstDayOfYear = new Date(date.getFullYear(), 0, 1);
var pastDaysOfYear = (date - firstDayOfYear) / 86400000;
return Math.ceil((pastDaysOfYear + firstDayOfYear.getDay() + 1) / 7);
}

var weekNumber = getWeekNumber(currentDate);

var message = "📅 *Full Date and Time Information:*\n";
message += "-----------------------------------\n";
message += "📅 *Day:* " + day + "\n";
message += "📅 *Month (Number):* " + month + "\n";
message += "📅 *Month (Name):* " + currentDate.toLocaleString('en-US', { month: 'long' }) + "\n";
message += "📅 *Year:* " + year + "\n";
message += "📅 *Day of the Week:* " + weekday + "\n";
message += "📅 *Week Number:* " + weekNumber + "\n";
message += "\n";
message += " *Time Information:*\n";
message += "-----------------------------------\n";
message += "🕒 *Hours:* " + hours + "\n";
message += "🕒 *Minutes:* " + minutes + "\n";
message += "🕒 *Seconds:* " + seconds + "\n";
message += "🕒 *Milliseconds:* " + milliseconds + "\n";
message += "\n";
message += "📅 *Formatted Date and Time:*\n";
message += "-----------------------------------\n";
message += "📅 *Formatted Date (dd/mm/yyyy):* " + formattedDate + "\n";
message += "🕒 *Formatted Time (hh:mm:ss):* " + formattedTime + "\n";
message += "\n";
message += "🌍 *Timezone:* " + timezone;

Api.sendMessage({
text: message,
parse_mode: "Markdown"
});
Forwarded from Goddy BJS
10 reactions for this bot👍✍️
Forwarded from Goddy BJS
Chat information Bjs ✍️

Command- /chatinfo

Bjs-


let chatTitle = chat.title;
let chatId = chat.id;
let chatType = chat.type;

let msg = "ℹ️ *Chat Information:*\n\n" +
"🔹 *Chat Name:* " + chatTitle + "\n" +
"🔹 *Chat ID:* " + chatId + "\n" +
"🔹 *Chat Type:* " + chatType + "\n";

if (chatType == "group" || chatType == "supergroup") {
msg += "🔹 *Group Members Count:* Use /getgroupmembercount to see\n";
}

Api.sendMessage({
text: msg,
parse_mode: "Markdown"
});
Forwarded from Goddy BJS
Command- /getmembercount

Bjs-
Api.getChatMembersCount({
chat_id: chat.chatid,
on_result: "/next"
});

Command- /next


var membersCount = options.result;
Bot.sendMessage("This group has " + membersCount + " members.");
Forwarded from Goddy BJS
When we get to 500 subscribers I would give away this Anonymous chat bot😁✍️
Forwarded from Goddy BJS
Goddy BJS
10 reactions for this bot👍✍️
Don’t forget this✍️
Forwarded from Goddy BJS
1️⃣Code to Hide Email/Number

Bjs-

For Number
let wallet = "138011457990"; 
let hide_wallet = "<b>Wallet:</b> " + wallet.substring(0, 3) + "•••••" + wallet.substring(8, 10);
Bot.sendMessage(hide_wallet, { parse_mode: "html" });

For Email
let email = "goddybjsthebest@gmail.com"; 
let hide_email = "<b>Email:</b> " + email.substring(0, 4) + "•••••" + email.substring(email.indexOf("@"));
Bot.sendMessage(hide_email, { parse_mode: "html" });
Forwarded from Goddy BJS
🧪 Get Forward Message Info From Channel.

🔰 Command:- your command

🎊 Answer:- *🦜 Forward Message From Channel.*

Wait For Answer:- On

🌐 BJS:-
if (request.forward_from_chat) {
  var id = request.forward_from_chat.id.toString()
  var uname = request.forward_from_chat.username
  var title = request.forward_from_chat.title
  var type = request.forward_from_chat.type
  var msg_id = request.forward_from_message_id

  if (request.forward_date) {
    var ttmm = request.forward_date * 1000
  } else {
    var ttmm = request.date * 1000
  }

  var date_time = Libs.DateTimeFormat.format(
    ttmm,
    "dddd, dd/m/yyyy",
    "Asia/Kolkata"
  )

  if (!uname || uname == null) {
    var username = `🚫 Not Set`
  } else {
    var username = "@" + uname
  }

  var uss =
    "<a href='https://t.me/c/" + id.slice(4) + "/" + msg_id + "'>Check Now</a>"

  var txt =if (request.forward_from_chat) {
  var id = request.forward_from_chat.id.toString()
  var uname = request.forward_from_chat.username
  var title = request.forward_from_chat.title
  var type = request.forw
  Api.sendMessage({ text: txt, parse_mode: "html" })
} else {
  Api.deleteMessage({ message_id: request.message_id })
}

💠 Must Download Date/Time Libs.

❤️‍🔥 Credit By:-
@AlgoRaushan