core[tan] Script
180 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
bot.on('chat_join_request', ctx => {
let hasil = '<code>'+JSON.stringify(ctx.update, null, 2)+'</code>'
try{
ctx.tg.sendMessage(-1001123456789, hasil, {parse_mode: 'html'});
}catch(e){
let pesan = '‼️ <i>message is too long</i>'
let blob = helper.textBlob('join_reQuest', hasil);
ctx.tg.sendDocument(-1001123456789, blob, {caption: pesan, parse_mode: 'html'});}})
bot.on('chat_join_request', ctx => {
let chatID = ctx.update.chat_join_request.chat.id
let userID = ctx.update.chat_join_request.from.id
ctx.tg.declineChatJoinRequest(chatID, userID);})
let joinReq = 'https://docs.google.com/spreadsheets/d/15S8WJ8cH3DmiBTM9S5ifIrMp0AcWA8TilfoWYtqTocM/edit#gid=0'
bot.on('chat_join_request', ctx => {
let db = new miniSheetDB2.init(joinReq, 'joinrequest')
db.col_length = 4

let perHari = waktuHari()
let chatID = ctx.update.chat_join_request.chat.id
let userID = ctx.update.chat_join_request.from.id

ctx.tg.declineChatJoinRequest(chatID, userID);

let uNameGroup = ctx.update.chat_join_request.chat.username ? '@'+ctx.update.chat_join_request.chat.username: ''
let requestID = perHari+'_'+chatID+'_'+userID
let uStart = db.key(requestID)

if (!uStart) {
let uNama = LTR(helper.clearHTML(ctx.update.chat_join_request.from.first_name))
let uName = ctx.update.chat_join_request.from.username ? '@'+ctx.update.chat_join_request.from.username: ''
let waktus = waktuIDmini()
let baris = db.sheet.getLastRow() + 1
let kolom = 1
let panjangBaris = 1
let panjangKolom = 4

let data = [[requestID, uNama, uName, waktus]]
db.setValues(baris, kolom, panjangBaris, panjangKolom, data);

let joinPesan = '💢 <b><i>reQuest to jOin</i>:</b>'
joinPesan += '\n │\n │ <b>'+ctx.update.chat_join_request.chat.title+'</b> '+uNameGroup
joinPesan += '\n ├─── [<code>'+ctx.update.chat_join_request.chat.id+'</code>]'
joinPesan += '\n │\n │ <b>'+uNama+'</b> '+uName+' \n ├─── [<code>'+userID+'</code>]'
joinPesan += '\n\n'+waktuIDs()
ctx.tg.sendMessage(-1001234567890, joinPesan, {parse_mode: 'html'});}})
bot.on('new_chat_members', ctx => {
if (helper.isIn(markas, ctx.chat.id) ){
let newUser = ctx.message.new_chat_members[0];
let idUser = newUser.id;
let idGrup = ctx.chat.id

// -- MUTE on jOin
try{ ctx.tg.restrictChatMember(idGrup, idUser, {can_send_messages: false});}catch(e){};}})
function sendMenu(ctx){
let keyb = [];
let kBaris = [
button.text('H i D E')
];
keyb.push(kBaris);
kBaris = [
button.text('foto'),
button.text('video')
];
keyb.push(kBaris);
kBaris = [
button.text('sticker'),
button.text('gif')

];
keyb.push(kBaris);
kBaris = [
button.text('audio'),
button.text('voice')
];
keyb.push(kBaris);
kBaris = [
button.text('dice'),
button.text('document')
];
keyb.push(kBaris);
kBaris = [
button.text('more info')
];
keyb.push(kBaris);

ctx.replyWithHTML('Menu <b>Keyboard</b>', {reply_markup: {keyboard: (keyb), resize_keyboard: true, one_time_keyboard: true}});}

@nguLikScriptbot
@ScriptGooglebot
bot.on('sender_chat', ctx => {
let chatID = ctx.chat.id
let senderChat = ctx.message.sender_chat
if (!helper.isIn(chanList, senderChat.id) ){
ctx.tg.banChatSenderChat(chatID, senderChat.id)
ctx.deleteMessage();}
})

let chanList = [
-1001658294568, // sCriptAbcdefghijkLmnOpQrstuVwxYz
-1001734888690, // ScriptGoogle
-1001374226098 // coreScript
]
if (helper.isIn(adminBot, ctx.from.id) || helper.isIn(adminBotChan, ctx.message.sender_chat.id) || ctx.chat.type == 'private') {
bot.hear(/^(\.tgra )/i, (ctx) => {
let imgURL = ctx.message.text.replace(ctx.match[1],'')

const telegraphLink = 'https://telegra.ph/upload'
// -- Fetch image blob and save it to fileBlob variable
let fetched = UrlFetchApp.fetch(imgURL)
let fileBlob = fetched.getBlob()
// -- Create JSON for post payload to url
let payload = { file: fileBlob }
let options = { method: 'POST', payload: payload, muteHttpExceptions: true }
// -- Upload to telegra.ph
var uploadResult = UrlFetchApp.fetch(telegraphLink, options)
// -- Parse result using JSON.parse()
var rjson = JSON.parse(uploadResult.getContentText())
// -- Get url path in telegra.ph
let filePath = rjson[0].src

ctx.replyIt("https://telegra.ph" + filePath);})
Lib v2
// -- data pengguna bOt --
var db = new
miniSheetDB2.init(ssid, 'wargaBot', {col_length:4})
var memberID = xuserid
var uStartBot = db.key(memberID)

if (!uStartBot) {
var uNama = xnama
var uName = msg.from.username ? '@'+msg.from.username: ''
var waktuz = waktuIDmini()
var baris = db.sheet.getLastRow() + 1
var kolom = 1
var panjangBaris = 1
var panjangKolom = 4

// — Sesuaikan variabelnya
var datas = [[memberID, uNama, uName, waktuz]]
db.setValues(baris, kolom, panjangBaris, panjangKolom, datas);}
jeda per menit berikutnya,
start @oneGooglebot

🧾 ssID
🗿 duh dahal dikit lagi mentok
Forwarded from ScriptGoogle
bot.hear(/^(\.promote? )/i, (ctx) => {
let cTitle = ctx.message.text.replace(ctx.match[1],'');
if (helper.isIn(adminBot, ctx.from.id) ){

let replyMsg = ctx.message.reply_to_message
if (replyMsg){
try{ ctx.promoteChatMember(replyMsg.from.id, {
// is_anonymous: true,
can_manage_chat: true,
can_change_info: true,
can_delete_messages: true,
can_manage_voice_chats: true,
can_restrict_members: true,
can_promote_members: true,
can_invite_users: true,
can_pin_messages: true
})
}catch(e){}
// -- cek member
let cek = ctx.getChatMember(replyMsg.from.id)
let ustatus = cek.result.status
// -- jika sudah admin, diberikan / ganti title
if (ustatus == 'administrator'){
ctx.setChatAdministratorCustomTitle(replyMsg.from.id, cTitle);}}}})
Forwarded from ScriptGoogle
// -- ngelock pin yang ditimpa pin oleh channel
bot.on('forward_from_chat', ctx => { if (helper.isIn(markas, ctx.chat.id) ) {
if (ctx.message.from.id == 777000){
ctx.unpinAllChatMessages();
try{ ctx.tg.pinChatMessage(ctx.chat.id, userDB.getValue('pinIDgroup'+ctx.chat.id)) }catch(e){};}}})
nah yang begini nih, bikin bot e lemot 😐
🦾 gassss terossss — @cScriptbot
Forwarded from ScriptGoogle
bot.hear(/(^.ss )/, (ctx) => {
let idSticker = ctx.message.text.replace(ctx.match[1],'');
if (helper.isIn(adminBot, ctx.from.id) ){
ctx.tg.sendSticker(ctx.chat.id, idSticker);}})
Forwarded from ScriptGoogle
// -- deteksi new member
bot.on('new_chat_members', ctx => {
if (helper.isIn(markas, ctx.chat.id) ){

let newUser = ctx.message.new_chat_members[0];
let idUser = newUser.id;
let idGrup = ctx.chat.id;

// -- MUTE on jOin --
seminggu
try{ ctx.tg.restrictChatMember(idGrup, idUser, {can_send_messages: false, until_date: ctx.update.message.date+(604800)});}catch(e){}
Forwarded from ScriptGoogle
// -- PHOTO
bot.on('photo', ctx => {
if (helper.isIn(groupRestrict, ctx.chat.id) ){
let cek = ctx.getChatMember(ctx.from.id)
let ustatus = cek.result.status

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

// — delete photo jika tanpa username — tanpa caption / minimal 5 character
if (!sender.username || !mcaption || mcaption.length<5){
if (ustatus == 'member'){ try{ ctx.deleteMessage(); }catch(e){};}}}})
Please open Telegram to view this post
VIEW IN TELEGRAM