Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // -- Lock Pin
- bot.hear(/^\.sPin$/i, (ctx) => {
- if (helper.isIn(adminBot, ctx.from.id) ){
- var replyMsg = ctx.message.reply_to_message
- if (replyMsg){
- var idPesanPin = replyMsg.message_id;
- userDB.setValue('pinIDgroup'+ctx.chat.id, idPesanPin)}
- ctx.tg.pinChatMessage(ctx.chat.id, idPesanPin);}
- ctx.deleteMessage()})
- // -- reload pin msg
- bot.hear(/^\.rPin$/i, (ctx) => {
- if (helper.isIn(adminBot, ctx.from.id) ){
- ctx.unpinAllChatMessages();
- ctx.tg.pinChatMessage(ctx.chat.id, userDB.getValue('pinIDgroup'+ctx.chat.id))};
- ctx.deleteMessage();})
- // -- ngelock pin yang ditimpa pin oleh channel
- bot.on('message', ctx => {
- if (helper.isIn(markas, ctx.chat.id) ) { if (ctx.message.forward_from_chat){
- if (ctx.message.from.id == 777000){
- ctx.unpinAllChatMessages();
- ctx.tg.pinChatMessage(ctx.chat.id, userDB.getValue('pinIDgroup'+ctx.chat.id));}}
- }})
- // -- semua members bebas nge-pin
- bot.hear(/^\.ipin$/i, (ctx) => {
- if (helper.isIn(markas, ctx.chat.id) ){
- var replyMsg = ctx.message.reply_to_message
- if (replyMsg){ ctx.tg.pinChatMessage(ctx.chat.id, replyMsg.message_id);}}
- ctx.deleteMessage();})
- // -- semua members bebas unPin -- kecuali pinLock
- bot.hear(/^\.upin$/i, (ctx) => {
- if (helper.isIn(markas, ctx.chat.id) ){
- let replyMsg = ctx.message.reply_to_message
- let pinLock = userDB.getValue('pinIDgroup'+ctx.chat.id)
- if (replyMsg.message_id != pinLock)
- ctx.tg.unpinChatMessage(ctx.chat.id, replyMsg.message_id);
- ctx.deleteMessage();}})
- // -- trigger bersihkan pin(Lock)
- bot.hear(/^!xPin$/i, (ctx) => {
- if (helper.isIn(adminBot, ctx.from.id) ){
- userDB.delete('pinIDgroup'+ctx.chat.id);
- ctx.tg.unpinAllChatMessages();
- ctx.replyItWithHTML('#pinLock‼️<b>OFF</b>');}
- ctx.deleteMessage();})
Advertisement
Add Comment
Please, Sign In to add comment