├── Anti.sh ├── AntiPlus.py ├── README.md └── Setup.sh /Anti.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | COUNTER=1 3 | while(true) do 4 | python AntiPlus.py 5 | let COUNTER=COUNTER+1 6 | done 7 | -------------------------------------------------------------------------------- /AntiPlus.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import telebot 3 | import logging 4 | import json 5 | import os 6 | from telebot import util 7 | import re 8 | from random import randint 9 | import random 10 | import requests as req 11 | import requests 12 | import commands 13 | import urllib2 14 | import urllib 15 | import telebot 16 | import ConfigParser 17 | import redis as r 18 | import redis as redis 19 | session = requests.session() 20 | from telebot import types 21 | import sys 22 | reload(sys) 23 | sys.setdefaultencoding("utf-8") 24 | token = '' #Token 25 | bot = telebot.TeleBot(token) 26 | database = redis.StrictRedis(host='localhost', port=6379, db=0, decode_responses=True) 27 | sudos = [198794027,264150062] #Sudo IDs 28 | channels = -1001054519880 #Channel ID 29 | db = "https://api.telegram.org/bot{}/getMe?".format(token) 30 | res = urllib.urlopen(db) 31 | res_body = res.read() 32 | parsed_json = json.loads(res_body.decode("utf-8")) 33 | botid = parsed_json['result']['id'] 34 | botuser = parsed_json['result']['username'] 35 | bhash = "blocked:users:{}".format(botuser) 36 | 37 | print "Launched>>>" 38 | 39 | ###################################################################################### 40 | 41 | def delmessage(token, chat_id, message_id): 42 | openurl = session.request('get', "https://api.telegram.org/bot{}/deletemessage?chat_id={}&message_id={}".format(token, chat_id, message_id), params=None, files=None, timeout=(3.5, 9999)) 43 | 44 | ###################################################################################### 45 | 46 | ############################# 47 | # Keys # 48 | ############################# 49 | 50 | commadns = types.InlineKeyboardMarkup() 51 | commadns.add(types.InlineKeyboardButton('Ƈσммαηɗѕ', callback_data='command')) 52 | commadns.add(types.InlineKeyboardButton('Mємвєяѕ', callback_data='botmembers')) 53 | 54 | 55 | commandlist = types.InlineKeyboardMarkup() 56 | commandlist.add(types.InlineKeyboardButton('IƊ', callback_data='getid'), types.InlineKeyboardButton('HєIɗ', callback_data='heid'), types.InlineKeyboardButton('ƤαηєƖ', callback_data='getpanel')) 57 | commandlist.add(types.InlineKeyboardButton('ƑƖтєя', callback_data='getfilter'), types.InlineKeyboardButton('UηƑƖтєя', callback_data='getunfilter'), types.InlineKeyboardButton('ƑιƖтєяLιѕт', callback_data='getfilters')) 58 | commandlist.add(types.InlineKeyboardButton('Sєттιηgѕ', callback_data='getsettings'), types.InlineKeyboardButton('Ƙιcк', callback_data='kicked'), types.InlineKeyboardButton('ƊєƖ', callback_data='delmsg')) 59 | commandlist.add(types.InlineKeyboardButton('SєтOωηєя', callback_data='setowners'), types.InlineKeyboardButton('ƊєƖOωηєя', callback_data='delowners'), types.InlineKeyboardButton('Ƥяσмσтє', callback_data='promote')) 60 | commandlist.add(types.InlineKeyboardButton('Ɗємσтє', callback_data='demote'), types.InlineKeyboardButton('ƜєƖcσмє', callback_data='welcomes'), types.InlineKeyboardButton('Ƭιмє', callback_data='times')) 61 | commandlist.add(types.InlineKeyboardButton('Lσνє', callback_data='love'), types.InlineKeyboardButton('LσƓσ', callback_data='logo'), types.InlineKeyboardButton('Mє', callback_data='me')) 62 | commandlist.add(types.InlineKeyboardButton('ƘιcкMє', callback_data='kickme'), types.InlineKeyboardButton('Ƈяєαтє', callback_data='create'), types.InlineKeyboardButton('Ɛcнσ', callback_data='echo')) 63 | commandlist.add(types.InlineKeyboardButton('Ɓαcк', callback_data='back')) 64 | 65 | 66 | backs = types.InlineKeyboardMarkup() 67 | backs.add(types.InlineKeyboardButton('Ɓαcк', callback_data='backs')) 68 | 69 | back = types.InlineKeyboardMarkup() 70 | back.add(types.InlineKeyboardButton('Ɓαcк', callback_data='back')) 71 | ####################################################################################### 72 | def setting(gpslock): 73 | mediasetting = types.InlineKeyboardMarkup() 74 | 75 | if database.get('text'+str(gpslock)): 76 | mediasetting.add(types.InlineKeyboardButton('Text', callback_data='untext'), types.InlineKeyboardButton('🔒', callback_data='untext')) 77 | else: 78 | mediasetting.add(types.InlineKeyboardButton('Text', callback_data='text'), types.InlineKeyboardButton('🔓', callback_data='text')) 79 | 80 | if database.get('photo'+str(gpslock)): 81 | mediasetting.add(types.InlineKeyboardButton('Photo', callback_data='unphoto'), types.InlineKeyboardButton('🔒', callback_data='unphoto')) 82 | else: 83 | mediasetting.add(types.InlineKeyboardButton('Photo', callback_data='photo'), types.InlineKeyboardButton('🔓', callback_data='photo')) 84 | 85 | if database.get('sticker'+str(gpslock)): 86 | mediasetting.add(types.InlineKeyboardButton('Sticker', callback_data='unsticker'), types.InlineKeyboardButton('🔒', callback_data='unsticker')) 87 | else: 88 | mediasetting.add(types.InlineKeyboardButton('Sticker', callback_data='sticker'), types.InlineKeyboardButton('🔓', callback_data='sticker')) 89 | 90 | if database.get('video'+str(gpslock)): 91 | mediasetting.add(types.InlineKeyboardButton('Video', callback_data='unvideo'), types.InlineKeyboardButton('🔒', callback_data='unvideo')) 92 | 93 | else: 94 | mediasetting.add(types.InlineKeyboardButton('Video', callback_data='video'), types.InlineKeyboardButton('🔓', callback_data='video')) 95 | 96 | if database.get('music'+str(gpslock)): 97 | mediasetting.add(types.InlineKeyboardButton('Music', callback_data='unmusic'), types.InlineKeyboardButton('🔒', callback_data='unmusic')) 98 | 99 | else: 100 | mediasetting.add(types.InlineKeyboardButton('Music', callback_data='music'), types.InlineKeyboardButton('🔓', callback_data='music')) 101 | 102 | if database.get('document'+str(gpslock)): 103 | mediasetting.add(types.InlineKeyboardButton('File', callback_data='unfile'), types.InlineKeyboardButton('🔒', callback_data='unfile')) 104 | else: 105 | mediasetting.add(types.InlineKeyboardButton('File', callback_data='file'), types.InlineKeyboardButton('🔓', callback_data='file')) 106 | 107 | #if database.get('locations'+str(gpslock)): 108 | # mediasetting.add(types.InlineKeyboardButton('Locations', callback_data='unloc'), types.InlineKeyboardButton('🔒', callback_data='unloc')) 109 | #else: 110 | # mediasetting.add(types.InlineKeyboardButton('Locations', callback_data='loc'), types.InlineKeyboardButton('🔓', callback_data='loc')) 111 | 112 | if database.get('spam'+str(gpslock)): 113 | mediasetting.add(types.InlineKeyboardButton('Spam', callback_data='unspam'), types.InlineKeyboardButton('🔒', callback_data='unspam')) 114 | else: 115 | mediasetting.add(types.InlineKeyboardButton('Spam', callback_data='spam'), types.InlineKeyboardButton('🔓', callback_data='spam')) 116 | 117 | mediasetting.add(types.InlineKeyboardButton('NextPage', callback_data='next')) 118 | 119 | return mediasetting 120 | 121 | def setting2(gpslock2): 122 | mediasetting2 = types.InlineKeyboardMarkup() 123 | 124 | if database.get('contact'+str(gpslock2)): 125 | mediasetting2.add(types.InlineKeyboardButton('Contacts', callback_data='uncontact'), types.InlineKeyboardButton('🔒', callback_data='uncontact')) 126 | else: 127 | mediasetting2.add(types.InlineKeyboardButton('Contacts', callback_data='contact'), types.InlineKeyboardButton('🔓', callback_data='contact')) 128 | 129 | if database.get('link'+str(gpslock2)): 130 | mediasetting2.add(types.InlineKeyboardButton('Links', callback_data='unlink'), types.InlineKeyboardButton('🔒', callback_data='unlink')) 131 | else: 132 | mediasetting2.add(types.InlineKeyboardButton('Links', callback_data='link'), types.InlineKeyboardButton('🔓', callback_data='link')) 133 | 134 | if database.get('forward'+str(gpslock2)): 135 | mediasetting2.add(types.InlineKeyboardButton('Forward', callback_data='unforward'), types.InlineKeyboardButton('🔒', callback_data='unforward')) 136 | else: 137 | mediasetting2.add(types.InlineKeyboardButton('Forward', callback_data='forward'), types.InlineKeyboardButton('🔓', callback_data='forward')) 138 | 139 | if database.get('persian'+str(gpslock2)): 140 | mediasetting2.add(types.InlineKeyboardButton('Persian', callback_data='unpersian'), types.InlineKeyboardButton('🔒', callback_data='unpersian')) 141 | else: 142 | mediasetting2.add(types.InlineKeyboardButton('Persian', callback_data='persian'), types.InlineKeyboardButton('🔓', callback_data='persian')) 143 | 144 | if database.get('english'+str(gpslock2)): 145 | mediasetting2.add(types.InlineKeyboardButton('English', callback_data='unenglish'), types.InlineKeyboardButton('🔒', callback_data='unenglish')) 146 | else: 147 | mediasetting2.add(types.InlineKeyboardButton('English', callback_data='english'), types.InlineKeyboardButton('🔓', callback_data='english')) 148 | 149 | if database.get('filters'+str(gpslock2)): 150 | mediasetting2.add(types.InlineKeyboardButton('Filters', callback_data='unfilter'), types.InlineKeyboardButton('🔒', callback_data='unfilter')) 151 | else: 152 | mediasetting2.add(types.InlineKeyboardButton('Filters', callback_data='filters'), types.InlineKeyboardButton('🔓', callback_data='filters')) 153 | 154 | if database.get('caption'+str(gpslock2)): 155 | mediasetting2.add(types.InlineKeyboardButton('Caption', callback_data='uncaption'), types.InlineKeyboardButton('🔒', callback_data='uncaption')) 156 | else: 157 | mediasetting2.add(types.InlineKeyboardButton('Caption', callback_data='caption'), types.InlineKeyboardButton('🔓', callback_data='caption')) 158 | 159 | if database.get('username'+str(gpslock2)): 160 | mediasetting2.add(types.InlineKeyboardButton('UserName', callback_data='unuser'), types.InlineKeyboardButton('🔒', callback_data='unuser')) 161 | else: 162 | mediasetting2.add(types.InlineKeyboardButton('UserName', callback_data='username'), types.InlineKeyboardButton('🔓', callback_data='username')) 163 | 164 | if database.get('tag'+str(gpslock2)): 165 | mediasetting2.add(types.InlineKeyboardButton('Tag', callback_data='untag'), types.InlineKeyboardButton('🔒', callback_data='untag')) 166 | else: 167 | mediasetting2.add(types.InlineKeyboardButton('Tag', callback_data='tag'), types.InlineKeyboardButton('🔓', callback_data='tag')) 168 | 169 | mediasetting2.add(types.InlineKeyboardButton('Back', callback_data='backpage')) 170 | 171 | return mediasetting2 172 | 173 | ###################################################################################### 174 | 175 | @bot.message_handler(commands=['start']) 176 | def start(message): 177 | bot.send_message(message.chat.id, '*AntiPlus Started*', reply_markup=commadns, parse_mode="Markdown") 178 | 179 | ###################################################################################### 180 | 181 | @bot.message_handler(commands=['help']) 182 | def help(msg): 183 | bot.send_message(msg.chat.id, '`You Can See My Commands`', reply_markup=commadns, parse_mode="Markdown") 184 | 185 | ###################################################################################### 186 | 187 | @bot.message_handler(commands=['fwd']) 188 | def fwd(msg): 189 | try: 190 | if msg.from_user.id in sudos: 191 | gpid = "-1001118067690" 192 | bot.forward_message(gpid, msg.chat.id, msg.reply_to_message.message_id) 193 | except: 194 | print("Test") 195 | 196 | ###################################################################################### 197 | 198 | @bot.message_handler(commands=['rem']) 199 | def adde(msg): 200 | if msg.from_user.id in sudos: 201 | if database.sismember("groups", msg.chat.id): 202 | database.srem("groups", msg.chat.id) 203 | bot.reply_to(msg, "👥Group > [ {} ] \nRemoved".format(msg.chat.id)) 204 | else: 205 | bot.reply_to(msg, "👥Group > [ {} ] \nNoT Added".format(msg.chat.id)) 206 | 207 | ###################################################################################### 208 | 209 | @bot.message_handler(commands=['setowner']) 210 | def setowner(msg): 211 | if msg.from_user.id in sudos: 212 | if msg.reply_to_message: 213 | if database.sismember("owners"+str(msg.chat.id), msg.reply_to_message.from_user.id): 214 | bot.reply_to(msg, "👤ID > [ {} ] Already Added To Owners List".format(msg.reply_to_message.from_user.id)) 215 | else: 216 | database.sadd("owners"+str(msg.chat.id), msg.reply_to_message.from_user.id) 217 | bot.reply_to(msg, "👤ID > [ {} ] Added To Owners List".format(msg.reply_to_message.from_user.id)) 218 | 219 | ###################################################################################### 220 | 221 | @bot.message_handler(commands=['time']) 222 | def time(msg): 223 | reqa = urllib2.Request('http://irapi.ir/time/') 224 | openera = urllib2.build_opener() 225 | fa = openera.open(reqa) 226 | parsed_jsona = json.loads(fa.read()) 227 | ENtime = parsed_jsona['ENtime'] 228 | ENdate = parsed_jsona['ENdate'] 229 | FAdate = parsed_jsona['FAdate'] 230 | timemenu = types.InlineKeyboardMarkup() 231 | timemenu.add(types.InlineKeyboardButton('🕐Time > {}'.format(ENtime), callback_data='entime')) 232 | timemenu.add(types.InlineKeyboardButton('📆Date > {}'.format(FAdate), callback_data='fadate')) 233 | timemenu.add(types.InlineKeyboardButton('📆ENDate > {}'.format(ENdate), callback_data='endate')) 234 | bot.reply_to(msg, "*Time And Date*".format(), reply_markup=timemenu, parse_mode="Markdown") 235 | 236 | ###################################################################################### 237 | 238 | @bot.message_handler(commands=['love']) 239 | def love(msg): 240 | try: 241 | text1 = msg.text.split()[1] 242 | text2 = msg.text.split()[2] 243 | urllib.urlretrieve("http://www.iloveheartstudio.com/-/p.php?t={}%20%EE%BB%AE%20{}&bc=FFCBDB&tc=000000&hc=ff0000&f=c&uc=true&ts=true&ff=PNG&w=500&ps=sq".format(text1,text2), "love.png") 244 | bot.send_sticker(msg.chat.id, open('love.png')) 245 | os.remove('love.png') 246 | except: 247 | bot.reply_to(msg, "Error!\n/love Text1 Text2") 248 | 249 | ###################################################################################### 250 | 251 | @bot.message_handler(commands=['me']) 252 | def me(msg): 253 | if database.sismember("owners"+str(msg.chat.id), msg.from_user.id): 254 | bot.reply_to(msg, "👤You Are Group Owner".format()) 255 | else: 256 | if msg.from_user.id in sudos: 257 | bot.reply_to(msg, "👤You Are My Sudo XD".format()) 258 | else: 259 | if database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 260 | bot.reply_to(msg, "👤You Are Group Promote".format()) 261 | else: 262 | bot.reply_to(msg, "👤You Are Group Member".format()) 263 | 264 | ###################################################################################### 265 | 266 | @bot.message_handler(commands=['panel']) 267 | def panel(msg): 268 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 269 | stats = database.scard('msg') 270 | groupss = database.scard('groups') 271 | members = database.scard('startbot') 272 | ownersgp = database.scard('owners'+str(msg.chat.id)) 273 | promotes = database.scard('promote'+str(msg.chat.id)) 274 | channel = types.InlineKeyboardMarkup() 275 | channel.add(types.InlineKeyboardButton('Members > {}'.format(members), callback_data='botmembers')) 276 | channel.add(types.InlineKeyboardButton('Owners > {}'.format(ownersgp), callback_data='ownerss')) 277 | channel.add(types.InlineKeyboardButton('Promote > {}'.format(promotes), callback_data='promotess')) 278 | channel.add(types.InlineKeyboardButton('Groups > {}'.format(groupss), callback_data='gps')) 279 | channel.add(types.InlineKeyboardButton('🌐Channel🌐', url='https://telegram.me/PlusTM')) 280 | bot.reply_to(msg, "👥Group Stats >".format(stats,groupss), reply_markup=channel) 281 | 282 | ###################################################################################### 283 | 284 | #@bot.message_handler(commands=['resmsgs']) 285 | #def add(msg): 286 | # if msg.from_user.id in sudos: 287 | # msgs = msg.message_id 288 | # database.srem('msgs', msg.chat.id) 289 | # bot.reply_to(msg, "All Message Reseted NoW".format()) 290 | 291 | ###################################################################################### 292 | 293 | #@bot.message_handler(commands=['resgps']) 294 | #def add(msg): 295 | # if msg.from_user.id in sudos: 296 | # database.srem('groups', msg.chat.id) 297 | # bot.reply_to(msg, "All Groups Reseted NoW".format()) 298 | 299 | ###################################################################################### 300 | 301 | @bot.message_handler(commands=['whois']) 302 | def whois(msg): 303 | try: 304 | res = "https://api.pwrtelegram.xyz/bot{}/getChat?chat_id={}".format(token,msg.text.split()[1]) #API ghat mibashad:| 305 | opener = urllib2.build_opener() 306 | f = opener.open(res) 307 | parsed_json = json.loads(f.read()) 308 | id = parsed_json["result"]["id"] 309 | username = parsed_json["result"]["username"] 310 | frist = parsed_json["result"]["first_name"] 311 | bot.reply_to(msg, "Name > [{}]\nID > [{}]\nUser > [@{}]".format(frist,id,username)) 312 | except: 313 | bot.reply_to(msg, "Error!\nThis ID For Group But This CMD For Users Or /whois UserName/ID") 314 | 315 | ###################################################################################### 316 | 317 | @bot.message_handler(commands=['gpinfo']) 318 | def gpinfo(msg): 319 | try: 320 | res = "https://api.pwrtelegram.xyz/bot{}/getChat?chat_id={}".format(token,msg.chat.id) #API ghat mibashad:| 321 | opener = urllib2.build_opener() 322 | f = opener.open(res) 323 | parsed_json = json.loads(f.read()) 324 | id = parsed_json["result"]["id"] 325 | title = parsed_json["result"]["title"] 326 | about = parsed_json["result"]["about"] 327 | gpusers = parsed_json["result"]["participants_count"] 328 | bot.reply_to(msg, "GroupInfo >\nName > [{}]\nID > [{}]\nMembers > [{}]\nAbout >\n[{}]".format(title,id,gpusers,about)) 329 | except: 330 | bot.reply_to(msg, "Error!") 331 | 332 | ###################################################################################### 333 | 334 | @bot.message_handler(commands=['logo']) 335 | def logo(msg): 336 | try: 337 | text1 = msg.text.split()[1] 338 | text2 = msg.text.split()[2] 339 | bot.reply_to(msg, "Please Wait...") 340 | res1 = "http://logo.irapi.ir/create/{}/{}".format(text1,text2) #API ghat mibashad:| 341 | opener = urllib2.build_opener() 342 | f = opener.open(res1) 343 | parsed_json = json.loads(f.read()) 344 | logos = parsed_json["url"] 345 | urllib.urlretrieve("http://{}".format(logos), "logo.png") 346 | bot.send_sticker(msg.chat.id, open('logo.png')) 347 | bot.send_photo(msg.chat.id, open('logo.png'), caption="Your LoGo\n@PlusTM") 348 | os.remove('logo.png') 349 | except: 350 | bot.reply_to(msg, "Error!\nYou Can Send 100 To 144") 351 | 352 | ###################################################################################### 353 | 354 | @bot.message_handler(commands=['tarikh']) 355 | def tarikh(msg): 356 | try: 357 | text1 = msg.text.split()[1] 358 | res1 = "https://api.feelthecode.xyz/convertdate/?date={}".format(text1) 359 | opener = urllib2.build_opener() 360 | f = opener.open(res1) 361 | parsed_json = json.loads(f.read()) 362 | tarikh = parsed_json["jalali_date"] 363 | bot.reply_to(msg, "{}".format(tarikh)) 364 | except: 365 | print("Error!") 366 | 367 | ###################################################################################### 368 | 369 | @bot.message_handler(commands=['date']) 370 | def date(msg): 371 | try: 372 | urllib.urlretrieve("https://api.feelthecode.xyz/sticker/date/".format(), "date.png") 373 | bot.send_sticker(msg.chat.id, open('date.png')) 374 | os.remove('date.png') 375 | except: 376 | print("Error!") 377 | 378 | ###################################################################################### 379 | 380 | @bot.message_handler(commands=['insta']) 381 | def instagram(msg): 382 | try: 383 | text1 = msg.text.split()[1] 384 | res1 = "https://instagram.com/{}/?__a=1".format(text1) 385 | opener = urllib2.build_opener() 386 | f = opener.open(res1) 387 | parsed_json = json.loads(f.read()) 388 | bio = (parsed_json["user"]["biography"] or '*****') 389 | followers = parsed_json["user"]["followed_by"]["count"] 390 | following = (parsed_json["user"]["follows"]["count"] or '*****') 391 | name = (parsed_json["user"]["full_name"] or '*****') 392 | id = (parsed_json["user"]["id"] or '*****') 393 | is_private = parsed_json["user"]["is_private"] 394 | pic_url = parsed_json["user"]["profile_pic_url_hd"] 395 | username = (parsed_json["user"]["username"] or '*****') 396 | fb = (parsed_json["user"]["connected_fb_page"] or '*****') 397 | urllib.urlretrieve("{}".format(pic_url), "pic.png") 398 | bot.send_photo(msg.chat.id, open('pic.png'), caption="Biografi > {}\nFollowers > {}\nFollowing > {}\nName > {}\nID > {}\nUserName > {}\nFaceBooK > {}".format(bio, followers, following, name, id, username, fb)) 399 | os.remove('pic.png') 400 | except: 401 | print("Error!") 402 | 403 | ###################################################################################### 404 | 405 | @bot.message_handler(commands=['down']) 406 | def instagramdown(msg): 407 | try: 408 | text1 = msg.text.split()[1] 409 | res1 = "http://api.mosydev.ir/instagram/?url={}".format(text1) #API ghat mibashad:| 410 | opener = urllib2.build_opener() 411 | f = opener.open(res1) 412 | parsed_json = json.loads(f.read()) 413 | url = parsed_json["url"] 414 | urllib.urlretrieve("{}".format(url), "insta.png") 415 | bot.send_photo(msg.chat.id, open('insta.png'), caption="Channel > [@PlusTM]") 416 | os.remove('insta.png') 417 | except: 418 | print("Error!") 419 | 420 | ###################################################################################### 421 | 422 | @bot.message_handler(commands=['voice']) 423 | def voice(msg): 424 | try: 425 | text1 = msg.text.split()[1] 426 | url="http://irapi.ir/farsireader/?text={}".format(text1) #API ghat mibashad:| 427 | bot.send_voice(msg.chat.id,url,caption="Voice > [{}]".format(text1)) 428 | except: 429 | print("Error!") 430 | 431 | ###################################################################################### 432 | 433 | @bot.message_handler(commands=['promote']) 434 | def promote(msg): 435 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id): 436 | if msg.reply_to_message: 437 | if database.sismember("promote"+str(msg.chat.id), msg.reply_to_message.from_user.id): 438 | bot.reply_to(msg, "👤ID > [ {} ] Already Added To Promote List".format(msg.reply_to_message.from_user.id)) 439 | else: 440 | database.sadd("promote"+str(msg.chat.id), msg.reply_to_message.from_user.id) 441 | bot.reply_to(msg, "👤ID > [ {} ] Added To Promote List".format(msg.reply_to_message.from_user.id)) 442 | 443 | ###################################################################################### 444 | 445 | @bot.message_handler(commands=['delowner']) 446 | def delowner(msg): 447 | if msg.from_user.id in sudos: 448 | if msg.reply_to_message: 449 | database.srem("owners"+str(msg.chat.id), msg.reply_to_message.from_user.id) 450 | bot.reply_to(msg, "👤ID > [ {} ] Removed The Owner List".format(msg.reply_to_message.from_user.id)) 451 | 452 | ###################################################################################### 453 | 454 | @bot.message_handler(commands=['demote']) 455 | def demote(msg): 456 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id): 457 | if msg.reply_to_message: 458 | database.srem("promote"+str(msg.chat.id), msg.reply_to_message.from_user.id) 459 | bot.reply_to(msg, "👤ID > [ {} ] Removed The Promote List".format(msg.reply_to_message.from_user.id)) 460 | 461 | ###################################################################################### 462 | 463 | @bot.message_handler(commands=['id']) 464 | def id(msg): 465 | if msg.from_user.id: 466 | id = msg.chat.id 467 | ids = msg.from_user.id 468 | ax = bot.get_user_profile_photos(ids) 469 | number = ax.total_count 470 | file = ax.photos[0][2].file_id 471 | text = "👤UserID > [ {} ]\n👥GroupID > [ {} ]".format(msg.from_user.id,id) 472 | bot.send_photo(msg.chat.id, file, caption='{}'.format(text)) 473 | #bot.reply_to(msg, "👤UserID > [ {} ]\n👥GroupID > [ {} ]".format(msg.from_user.id,id)) 474 | 475 | ###################################################################################### 476 | 477 | @bot.message_handler(commands=['creator']) 478 | def creator(msg): 479 | bot.reply_to(msg, "AntiPlus\nنوشته شده توسط :\n@HajiNitro\n@PlusTM\nآدرس سورس ربات :\nhttps://github.com/PlusTM/AntiPlus\nستاره یادتون نره :)".format()) 480 | 481 | ###################################################################################### 482 | 483 | @bot.message_handler(commands=['heid']) 484 | def heid(msg): 485 | if msg.from_user.id: 486 | try: 487 | id = msg.chat.id 488 | bot.reply_to(msg, "👤UserID > [ {} ]".format(msg.reply_to_message.from_user.id,id)) 489 | except: 490 | bot.reply_to(msg, "Just By Reply To User Message :)".format()) 491 | 492 | ###################################################################################### 493 | 494 | @bot.message_handler(commands=['kick']) 495 | def kick(msg): 496 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 497 | try: 498 | id = msg.chat.id 499 | bot.kick_chat_member(msg.chat.id, msg.reply_to_message.from_user.id) 500 | bot.reply_to(msg, "User [{}] Kicked!".format(msg.reply_to_message.from_user.id)) 501 | except: 502 | bot.reply_to(msg, "Just By Reply To User Message :)".format()) 503 | 504 | ###################################################################################### 505 | 506 | @bot.message_handler(commands=['kickme']) 507 | def kickme(msg): 508 | if msg.from_user.id: 509 | try: 510 | id = msg.chat.id 511 | #bot.reply_to(msg, "User [{}] Kicked! By Self".format(msg.from_user.id)) 512 | bot.kick_chat_member(msg.chat.id, msg.from_user.id) 513 | except: 514 | bot.reply_to(msg, "I Can NoT Kick You:|".format()) 515 | 516 | ###################################################################################### 517 | 518 | @bot.message_handler(commands=['setwlc']) 519 | def setwlc(msg): 520 | ids = msg.chat.id 521 | database.delete("gpwlc","{}".format(ids)) 522 | owners = database.sismember('owners'+str(ids), '{}'.format(msg.from_user.id)) 523 | if str(owners) == 'True': 524 | database.hset("gpwlc","{}".format(ids),msg.text.replace('/setwlc ','')) 525 | bot.reply_to(msg, "👥Group Welcome Seted!".format()) 526 | 527 | ###################################################################################### 528 | 529 | @bot.message_handler(commands=['del']) 530 | def delete(msg): 531 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 532 | if msg.reply_to_message: 533 | delmessage(token, msg.chat.id, msg.reply_to_message.message_id) 534 | delmessage(token, msg.chat.id, msg.message_id) 535 | 536 | ###################################################################################### 537 | 538 | @bot.message_handler(content_types=['new_chat_member']) 539 | def welcome(msg): 540 | id = msg.from_user.id 541 | channels = types.InlineKeyboardMarkup() 542 | channels.add(types.InlineKeyboardButton('🌐Channel🌐', url='https://telegram.me/PlusTM')) 543 | text = database.hget("gpwlc","{}".format(msg.chat.id)) 544 | bot.reply_to(msg, "{}".format(text), reply_markup=channels) 545 | 546 | ###################################################################################### 547 | 548 | @bot.message_handler(content_types=['left_chat_member']) 549 | def welcome(msg): 550 | id = msg.from_user.id 551 | channels = types.InlineKeyboardMarkup() 552 | channels.add(types.InlineKeyboardButton('🌐Channel🌐', url='https://telegram.me/PlusTM')) 553 | bot.reply_to(msg, "User [{}] Bye Bye:)".format(id), reply_markup=channels) 554 | 555 | ###################################################################################### 556 | 557 | @bot.message_handler(commands=['settings']) 558 | def locks(msg): 559 | if database.sismember("groups", msg.chat.id): 560 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 561 | try: 562 | if database.get(msg.from_user.id): 563 | bot.reply_to(msg, "Please Wait For {} Sec".format(database.ttl(msg.from_user.id))) 564 | else: 565 | bot.send_message(msg.chat.id, "👥Group Settings >".format(), reply_markup=setting(msg.chat.id)) 566 | except: 567 | #bot.send_message(msg.chat.id, "👥Group Settings :".format(database), reply_markup=setting(msg.chat.id)) 568 | database.setex(msg.from_user.id, 60, True) 569 | 570 | ###################################################################################### 571 | 572 | @bot.message_handler(commands=['create']) 573 | def create(msg): 574 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 575 | try: 576 | if msg.from_user.id: 577 | text2 = msg.text.split()[2] 578 | text3 = msg.text.split()[3] 579 | text1 = msg.text.split()[1] 580 | st = url='{}'.format(text3) 581 | create = types.InlineKeyboardMarkup() 582 | create.add(types.InlineKeyboardButton('{}'.format(text2), st)) 583 | bot.reply_to(msg, "{}".format(text1), reply_markup=create) 584 | else: 585 | bot.reply_to(msg, "_|_".format()) 586 | except: 587 | bot.reply_to(msg, "Error!".format()) 588 | 589 | @bot.message_handler(commands=['echo']) 590 | def echo(msg): 591 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 592 | try: 593 | if database.get(msg.from_user.id): 594 | text = msg.text.replace('/echo ','') 595 | bot.reply_to(msg, "Please Wait For {} Sec".format(database.ttl(msg.from_user.id))) 596 | #bot.kick_chat_member(msg.chat.id, msg.from_user.id) 597 | else: 598 | bot.reply_to(msg, "{}".format(text,database)) 599 | except: 600 | text = msg.text.replace('/echo ','') 601 | bot.reply_to(msg, "{}".format(text,database)) 602 | database.setex(msg.from_user.id, 60, True) 603 | 604 | ###################################################################################### 605 | 606 | @bot.message_handler(commands=['filter']) 607 | def filter(msg): 608 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id): 609 | text = msg.text.replace('/filter ','') 610 | filters = database.sadd("filters", text) 611 | bot.reply_to(msg, "{} Added To Filter List".format(text)) 612 | 613 | ###################################################################################### 614 | 615 | @bot.message_handler(commands=['unfilter']) 616 | def unfilter(msg): 617 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id): 618 | try: 619 | text = msg.text.replace('/unfilter ','') 620 | filters = database.srem("filters", text) 621 | bot.reply_to(msg, "{} Removed!".format(text)) 622 | except: 623 | bot.reply_to(msg, "{} NoT Filter".format(text)) 624 | 625 | ###################################################################################### 626 | 627 | @bot.message_handler(commands=['filterlist']) 628 | def filterlist(msg): 629 | if msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 630 | i = 1 631 | words = database.smembers("filters") 632 | pm = "لیست کلمات فیلتر شده :\n\n" 633 | for word in words: 634 | pm = "{}{}- {}\n".format(pm,i,word) 635 | i = i + 1 636 | bot.reply_to(msg, "{}".format(pm)) 637 | 638 | ###################################################################################### 639 | 640 | @bot.callback_query_handler(func=lambda call: True) 641 | def callback_inline(call): 642 | print call 643 | if database.sismember("groups", call.message.chat.id): 644 | if call.from_user.id in sudos or database.sismember("owners"+str(call.message.chat.id), call.from_user.id): 645 | gplink = call.message.chat.id 646 | if call.data.startswith("untext"): 647 | database.delete('text'+str(gplink)) 648 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 649 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Text has been UnLocked") 650 | 651 | if call.data.startswith("text"): 652 | database.set('text'+str(gplink), True) 653 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 654 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Text has been Locked !") 655 | 656 | if call.data.startswith("unphoto"): 657 | database.delete('photo'+str(gplink)) 658 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 659 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Photo has been UnLocked !") 660 | 661 | if call.data.startswith("photo"): 662 | database.set('photo'+str(gplink), True) 663 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 664 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Photo has been Locked ") 665 | 666 | if call.data.startswith("unsticker"): 667 | database.delete('sticker'+str(gplink)) 668 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 669 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Sticker has been UnLocked !") 670 | 671 | if call.data.startswith("sticker"): 672 | database.set('sticker'+str(gplink),True) 673 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 674 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Sticker has been Locked !") 675 | 676 | if call.data.startswith("unvideo"): 677 | database.delete('video'+str(gplink)) 678 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 679 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Video has been UnLocked !") 680 | 681 | if call.data.startswith("video"): 682 | database.set('video'+str(gplink), True) 683 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 684 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Video has been Locked !") 685 | 686 | 687 | if call.data.startswith("unmusic"): 688 | database.delete('music'+str(gplink)) 689 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 690 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Music has been UnLocked !") 691 | 692 | if call.data.startswith("music"): 693 | database.set('music'+str(gplink),True) 694 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 695 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Music has been Locked !") 696 | 697 | if call.data.startswith("unfile"): 698 | database.delete('document'+str(gplink)) 699 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 700 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="File has been UnLocked !") 701 | 702 | if call.data.startswith("file"): 703 | database.set('document'+str(gplink),True) 704 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 705 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="File has been Locked !") 706 | 707 | #if call.data.startswith("unloc"): 708 | # database.delete('Locations'+str(gplink)) 709 | # bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 710 | # bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Locations has been UnLocked") 711 | 712 | #if call.data.startswith("loc"): 713 | # database.set('Locations'+str(gplink),True) 714 | # bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 715 | # bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Locations has been Locked !") 716 | 717 | if call.data.startswith("uncontact"): 718 | database.delete('contact'+str(gplink)) 719 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 720 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Contacts has been UnLocked !") 721 | 722 | if call.data.startswith("contact"): 723 | database.set('contact'+str(gplink),True) 724 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 725 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Contacts has been Locked !") 726 | 727 | if call.data.startswith("unlink"): 728 | database.delete('link'+str(gplink)) 729 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 730 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Link has been UnLocked") 731 | 732 | if call.data.startswith("link"): 733 | database.set('link'+str(gplink), True) 734 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 735 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Link has been Locked !") 736 | 737 | if call.data.startswith("unforward"): 738 | database.delete('forward'+str(gplink)) 739 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 740 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Forward has been UnLocked") 741 | 742 | if call.data.startswith("forward"): 743 | database.set('forward'+str(gplink), True) 744 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 745 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Forward has been Locked !") 746 | 747 | if call.data.startswith("unpersian"): 748 | database.delete('persian'+str(gplink)) 749 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 750 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Persian has been UnLocked") 751 | 752 | if call.data.startswith("persian"): 753 | database.set('persian'+str(gplink), True) 754 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 755 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Persian has been Locked !") 756 | 757 | if call.data.startswith("unenglish"): 758 | database.delete('english'+str(gplink)) 759 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 760 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="English has been UnLocked") 761 | 762 | if call.data.startswith("english"): 763 | database.set('english'+str(gplink), True) 764 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 765 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="English has been Locked !") 766 | 767 | if call.data.startswith("unfilter"): 768 | database.delete('filters'+str(gplink)) 769 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 770 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Filter has been UnLocked") 771 | 772 | if call.data.startswith("filters"): 773 | database.set('filters'+str(gplink), True) 774 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 775 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Filter has been Locked !") 776 | 777 | if call.data.startswith("uncaption"): 778 | database.delete('caption'+str(gplink)) 779 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 780 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Caption has been UnLocked") 781 | 782 | if call.data.startswith("caption"): 783 | database.set('caption'+str(gplink), True) 784 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 785 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Caption has been Locked !") 786 | 787 | if call.data.startswith("unuser"): 788 | database.delete('username'+str(gplink)) 789 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 790 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="UserName has been UnLocked") 791 | 792 | if call.data.startswith("username"): 793 | database.set('username'+str(gplink), True) 794 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 795 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="UserName has been Locked !") 796 | 797 | if call.data.startswith("untag"): 798 | database.delete('tag'+str(gplink)) 799 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 800 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Tag has been UnLocked") 801 | 802 | if call.data.startswith("tag"): 803 | database.set('tag'+str(gplink), True) 804 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting2(gplink)) 805 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Tag has been Locked !") 806 | 807 | if call.data.startswith("unspam"): 808 | database.delete('spam'+str(gplink)) 809 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 810 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Spam has been UnLocked") 811 | 812 | if call.data.startswith("spam"): 813 | database.set('spam'+str(gplink), True) 814 | bot.edit_message_reply_markup(chat_id=call.message.chat.id, message_id=call.message.message_id, reply_markup=setting(gplink)) 815 | bot.answer_callback_query(callback_query_id=call.id, show_alert=False, text="Spam has been Locked !") 816 | 817 | if call.data == "msgss": 818 | bot.answer_callback_query(callback_query_id=call.id,text="All Msgs") 819 | 820 | if call.data == "gps": 821 | bot.answer_callback_query(callback_query_id=call.id,text="All Groups") 822 | 823 | if call.data == "ownerss": 824 | bot.answer_callback_query(callback_query_id=call.id,text="All Group Owners") 825 | 826 | if call.data == "promotess": 827 | bot.answer_callback_query(callback_query_id=call.id,text="All Group Promote") 828 | 829 | if call.data == "next": 830 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='👥Group Settings >', reply_markup=setting2(gplink)) 831 | 832 | if call.data == "backpage": 833 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text='👥Group Settings >', reply_markup=setting(gplink)) 834 | 835 | if call.data == "endate": 836 | bot.answer_callback_query(callback_query_id=call.id,text="📆ENDate📆") 837 | 838 | if call.data == "fadate": 839 | bot.answer_callback_query(callback_query_id=call.id,text="📆Date📆") 840 | 841 | if call.data == "entime": 842 | bot.answer_callback_query(callback_query_id=call.id,text="🕐Time🕐") 843 | 844 | if call.data == "command": 845 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="Ƈσммαηɗѕ Lιѕт >", reply_markup=commandlist, parse_mode="Markdown") 846 | bot.answer_callback_query(callback_query_id=call.id,text="Commands List") 847 | 848 | if call.data == "getid": 849 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɠєт Ƴσυя IƊ Aηɗ ƤяσfιƖє Aηɗ ƓяσυρIƊ*\n`[/]id`", reply_markup=backs, parse_mode="Markdown") 850 | bot.answer_callback_query(callback_query_id=call.id,text="Help ID") 851 | 852 | if call.data == "heid": 853 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɠєт Uѕєя IƊ Ɓу RєρƖу*\n`[/]heid`", reply_markup=backs, parse_mode="Markdown") 854 | bot.answer_callback_query(callback_query_id=call.id,text="Help HeID") 855 | 856 | if call.data == "getpanel": 857 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɠєт ƁσƬ Iηfσ(Ɠяσυρѕ/Oωηєяѕ/Ƥяσмσтѕ...)*\n`[/]panel`", reply_markup=backs, parse_mode="Markdown") 858 | bot.answer_callback_query(callback_query_id=call.id,text="Help Panel") 859 | 860 | if call.data == "getfilter": 861 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*ƑιƖтєя Ƴσυя Ɯσяɗ Ƒσя ƊєƖєтє*\n`[/]filter [Text]`", reply_markup=backs, parse_mode="Markdown") 862 | bot.answer_callback_query(callback_query_id=call.id,text="Help Filter") 863 | 864 | if call.data == "getunfilter": 865 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*UηƑιƖтєя Ƴσυ Ɯσяɗ*\n[/]`unfilter [Text]`", reply_markup=backs, parse_mode="Markdown") 866 | bot.answer_callback_query(callback_query_id=call.id,text="Help UnFilter") 867 | 868 | if call.data == "getfilters": 869 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Sнσω ƑιƖтєяLιѕт*\n`[/]filterlist`", reply_markup=backs, parse_mode="Markdown") 870 | bot.answer_callback_query(callback_query_id=call.id,text="Help FilterList") 871 | 872 | if call.data == "getsettings": 873 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Sнσω Ɠяσυρ Sєттιηgѕ*\n`[/]settings`", reply_markup=backs, parse_mode="Markdown") 874 | bot.answer_callback_query(callback_query_id=call.id,text="Help Settings") 875 | 876 | if call.data == "kicked": 877 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ƙιcк Uѕєя Ƒяσм Ɠяσυρ Ɓу RєρƖу*\n`[/]kick`", reply_markup=backs, parse_mode="Markdown") 878 | bot.answer_callback_query(callback_query_id=call.id,text="Help Kick") 879 | 880 | if call.data == "delmsg": 881 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*ƊєƖєтє Mєѕѕαgє Ɓу RєρƖу*\n`[/]del`", reply_markup=backs, parse_mode="Markdown") 882 | bot.answer_callback_query(callback_query_id=call.id,text="Help Delete Message") 883 | 884 | if call.data == "setowners": 885 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Sєт Ɠяσυρ Oωηєя Ɓу RєρƖу*\n`[/]setowner`", reply_markup=backs, parse_mode="Markdown") 886 | bot.answer_callback_query(callback_query_id=call.id,text="Help SetOwner") 887 | 888 | if call.data == "delowners": 889 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*ƊєƖ Ɠяσυρ Oωηєя Ɓу RєρƖу*\n`[/]delowner`", reply_markup=backs, parse_mode="Markdown") 890 | bot.answer_callback_query(callback_query_id=call.id,text="Help DelOwner") 891 | 892 | if call.data == "promotes": 893 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Sєт Ɠяσυρ Ƥяσмσтє Ɓу RєρƖу*\n`[/]promote`", reply_markup=backs, parse_mode="Markdown") 894 | bot.answer_callback_query(callback_query_id=call.id,text="Help Promote") 895 | 896 | if call.data == "demote": 897 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*ƊєƖ Ɠяσυρ Ƥяσмσтє Ɓу RєρƖу*\n`[/]demote`", reply_markup=backs, parse_mode="Markdown") 898 | bot.answer_callback_query(callback_query_id=call.id,text="Help Demote") 899 | 900 | if call.data == "welcomes": 901 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Sєт Ɠяσυρ ƜєƖcσмє*\n`[/]setwlc`", reply_markup=backs, parse_mode="Markdown") 902 | bot.answer_callback_query(callback_query_id=call.id,text="Help Welcome") 903 | 904 | if call.data == "times": 905 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɠєт Iяαη Ƭιмє Aηɗ Ɗαтє*\n`[/]time`", reply_markup=backs, parse_mode="Markdown") 906 | bot.answer_callback_query(callback_query_id=call.id,text="Help Time") 907 | 908 | if call.data == "love": 909 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ƈяєαтє Lσνє Sтιcкєя*\n`[/]love [Text] [Text]`", reply_markup=backs, parse_mode="Markdown") 910 | bot.answer_callback_query(callback_query_id=call.id,text="Help Love") 911 | 912 | if call.data == "logo": 913 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ƈяєαтє Ƴσυя LσƓσ*\n`[/]logo [Number(100-144)] [Text]`", reply_markup=backs, parse_mode="Markdown") 914 | bot.answer_callback_query(callback_query_id=call.id,text="Help LoGo") 915 | 916 | if call.data == "me": 917 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɠєт Ƴσυя Rαηк Ƭσ Ɠяσυρ*\n`[/]me`", reply_markup=backs, parse_mode="Markdown") 918 | bot.answer_callback_query(callback_query_id=call.id,text="Help Me") 919 | 920 | if call.data == "create": 921 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ƈяєαтє Ƙєувσαяɗ IηƖιηє*\n`[/]create [Text] [Text] [Url]`", reply_markup=backs, parse_mode="Markdown") 922 | bot.answer_callback_query(callback_query_id=call.id,text="Help Create Keyboard") 923 | 924 | if call.data == "kickme": 925 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ƙιcк Uѕєя Ɓу SєƖf*\n`[/]kickme`", reply_markup=backs, parse_mode="Markdown") 926 | bot.answer_callback_query(callback_query_id=call.id,text="Help KickMe") 927 | 928 | if call.data == "echo": 929 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɛcнσ Ƴσυя Ƭєxт*\n`[/]echo [Text]`", reply_markup=backs, parse_mode="Markdown") 930 | bot.answer_callback_query(callback_query_id=call.id,text="Help Echo") 931 | 932 | if call.data == "backs": 933 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="Ƈσммαηɗѕ Lιѕт >", reply_markup=commandlist, parse_mode="Markdown") 934 | bot.answer_callback_query(callback_query_id=call.id,text="Back To Commands List") 935 | 936 | if call.data == "back": 937 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="Ɓαcк Ƭσ Ɓσт Mєηυ", reply_markup=commadns, parse_mode="Markdown") 938 | bot.answer_callback_query(callback_query_id=call.id,text="Back To Menu") 939 | 940 | if call.data == "botmembers": 941 | members = database.scard('startbot') 942 | bot.edit_message_text(chat_id=call.message.chat.id, message_id=call.message.message_id, text="*Ɓσт Mємвєяѕ >* `[{}]`".format(members), reply_markup=back, parse_mode="Markdown") 943 | bot.answer_callback_query(callback_query_id=call.id,text="Bot Members") 944 | 945 | 946 | ###################################################################################### 947 | 948 | @bot.message_handler(commands=['add']) 949 | def adde(msg): 950 | if msg.from_user.id in sudos: 951 | if database.sismember("groups", msg.chat.id): 952 | bot.reply_to(msg, "👥Group > [ {} ] \n🎗Already Added To Gp List".format(msg.chat.id)) 953 | else: 954 | database.sadd("groups", msg.chat.id) 955 | bot.reply_to(msg, "👥Group > [ {} ] \n🎗Added To Gp List".format(msg.chat.id)) 956 | 957 | ###################################################################################### 958 | 959 | @bot.message_handler(content_types=['text', 'caption', 'username', 'tag', 'persian', 'english', 'filters', 'forward', 'link', 'sticker', 'locations', 'contact', 'document', 'audio', 'video', 'photo']) 960 | def delete(msg): 961 | print msg 962 | 963 | id = msg.chat.id 964 | flood_max = 5 #You Can Change This Number 965 | flood_time = 1 #You Can Change This Number 966 | post_count = database.get("FloodCount"+str(id)+":"+str(msg.from_user.id)) 967 | database.setex("FloodCount{}:{}".format(id,msg.from_user.id),flood_time,int(flood_max) + 1) 968 | 969 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 970 | if database.get("spam"+str(msg.chat.id)): 971 | if post_count > flood_max: 972 | bot.delete_message(msg.chat.id, msg.message_id) 973 | bot.kick_chat_member(msg.chat.id, msg.from_user.id) 974 | text = msg.text 975 | if len(text) >= 300: 976 | bot.delete_message(msg.chat.id, msg.message_id) 977 | 978 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 979 | if msg.sticker and database.get("sticker"+str(msg.chat.id)): 980 | delmessage(token, msg.chat.id, msg.message_id) 981 | 982 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 983 | if msg.location and database.get("location"+str(msg.chat.id)): 984 | delmessage(token, msg.chat.id, msg.message_id) 985 | 986 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 987 | if msg.text and database.get("text"+str(msg.chat.id)): 988 | delmessage(token, msg.chat.id, msg.message_id) 989 | 990 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 991 | if msg.contact and database.get("contact"+str(msg.chat.id)): 992 | delmessage(token, msg.chat.id, msg.message_id) 993 | 994 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 995 | if msg.document and database.get("document"+str(msg.chat.id)): 996 | delmessage(token, msg.chat.id, msg.message_id) 997 | 998 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 999 | if msg.audio and database.get("music"+str(msg.chat.id)): 1000 | delmessage(token, msg.chat.id, msg.message_id) 1001 | 1002 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1003 | if msg.video and database.get("video"+str(msg.chat.id)): 1004 | delmessage(token, msg.chat.id, msg.message_id) 1005 | 1006 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1007 | if msg.photo and database.get("photo"+str(msg.chat.id)): 1008 | delmessage(token, msg.chat.id, msg.message_id) 1009 | 1010 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1011 | if msg.location and database.get("locations"+str(msg.chat.id)): 1012 | delmessage(token, msg.chat.id, msg.message_id) 1013 | 1014 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1015 | if msg.caption and database.get("caption"+str(msg.chat.id)): 1016 | delmessage(token, msg.chat.id, msg.message_id) 1017 | 1018 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1019 | if msg.forward_from and database.get("forward"+str(msg.chat.id)): 1020 | delmessage(token, msg.chat.id, msg.message_id) 1021 | 1022 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1023 | if database.get("link"+str(msg.chat.id)): 1024 | if re.findall("(https://telegram.me/\w.+)", msg.text) or re.findall("(https://t.me/\w.+)", msg.text) or re.findall("(t.me/\w.+)", msg.text) or re.findall("(telegram.me/\w.+)", msg.text): 1025 | delmessage(token, msg.chat.id, msg.message_id) 1026 | 1027 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1028 | if database.get("persian"+str(msg.chat.id)): 1029 | cps = (msg.photo or msg.caption or msg.text) 1030 | if re.match("(ض|ص|ث|ق|ف|غ|ع|ه|خ|ح|ج|چ|پ|ش|س|ی|ب|ل|ا|ت|ن|مپک|گ|ظ|ط|ز|ژ|ر|ذ|د|ئ|ئ|و|)", msg.text): 1031 | delmessage(token, msg.chat.id, msg.message_id) 1032 | 1033 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1034 | if database.get("english"+str(msg.chat.id)): 1035 | cps = (msg.photo or msg.caption or msg.text) 1036 | if re.match("(q|w|e|r|t|y|u|i|o|p|a|s|d|f|g|h|j|k|l|z|x|c|v|b|n|m|Q|W|E|R|T|Y|U|I|O|P|A|S|D|F|G|H|J|K|L|Z|X|C|V|B|N|M)", msg.text): 1037 | delmessage(token, msg.chat.id, msg.message_id) 1038 | 1039 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1040 | if database.get("tag"+str(msg.chat.id)): 1041 | if re.findall("#(\w+)", msg.text): 1042 | delmessage(token, msg.chat.id, msg.message_id) 1043 | 1044 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1045 | if database.get("username"+str(msg.chat.id)): 1046 | if re.findall("@(\w+)", msg.text): 1047 | delmessage(token, msg.chat.id, msg.message_id) 1048 | 1049 | if not msg.from_user.id in sudos or database.sismember("owners"+str(msg.chat.id), msg.from_user.id) or database.sismember("promote"+str(msg.chat.id), msg.from_user.id): 1050 | filters = database.smembers("filters") 1051 | 1052 | for i in filters: 1053 | if re.findall("({}.*)".format(i), msg.text, re.M|re.DOTALL): 1054 | delmessage(token, msg.chat.id, msg.message_id) 1055 | 1056 | 1057 | ###################################################################################### 1058 | 1059 | #@bot.message_handler(content_types=["text"]) 1060 | #def msgs(msg): 1061 | # msgs = msg.message_id 1062 | # database.sadd('msg', msgs) 1063 | 1064 | ###################################################################################### 1065 | # BoT Writed By Mr.Nitro(@HajiNitro) & @PlusTM 1066 | # Thanks To : 1 : @AlphaCyber 2 : @MosyDev 3: @Anony 1067 | 1068 | # Version > (FINAL) # 1069 | bot.polling(True) 1070 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AntiPlus `(FINAL)` 2 | 3 | `git clone https://github.com/PlusTM/AntiPlus` 4 | 5 | `cd AntiPlus` 6 | 7 | `chmod +x Setup.sh` 8 | 9 | `./Setup.sh` 10 | 11 | **Open AntiPlus.py File And Set Your Token And Sudo ID** 12 | 13 | `screen ./Anti.sh` 14 | 15 | # **Help** 16 | 17 | ### SetOwner By Reply 18 | > [/]setowner 19 | 20 | ### DelOwner By Reply 21 | > [/]delowner 22 | 23 | ### SetPromote By Reply 24 | > [/]promote 25 | 26 | ### DelPromote By Reply 27 | > [/]demote 28 | 29 | ### Show Group Setting 30 | > [/]settings 31 | 32 | ### Show User ID 33 | > [/]id 34 | >>[/]heid 35 | 36 | ### Filter & UnFilter Word 37 | > [/]filter [Word] 38 | >>[/]unfilter [Word] 39 | 40 | ### Delete Message By Relpy 41 | > [/]del 42 | 43 | ### SetWelcome 44 | > [/]setwlc [TEXT] 45 | 46 | ### Added Group 47 | > [/]add 48 | 49 | ### Removed Group 50 | > [/]rem 51 | 52 | ### Show Time 53 | > [/]time 54 | 55 | ### Create Love Sticker 56 | > [/]love [Text1] [Text2] 57 | 58 | ### Create LoGo 59 | > [/]logo [Num(100-144)] [Text] 60 | 61 | ### Show Your Rank 62 | > [/]me 63 | 64 | ### Show Panel 65 | > [/]panel 66 | 67 | ### Kick User By Reply 68 | > [/]kick 69 | 70 | ### Kickme 71 | > [/]kickme 72 | 73 | ### Create InlineKeyboard 74 | > [/]create [Text1] [Text2] [Url] 75 | 76 | ### Echo 77 | > [/]echo [TEXT] 78 | 79 | ### Change Date 80 | > [/]tarikh [Year/month/day] 81 | 82 | ### Show Date 83 | > [/]date 84 | 85 | ### Show Instagram Account 86 | > [/]insta [UserNameAccount] 87 | 88 | ### Show Help List 89 | > [/]help 90 | 91 | [MrNitro](https://t.me/HajiNitro) && [ForReport](https://t.me/PVSefareshatBoT) 92 | 93 | Thanks To : 94 | 95 | [AlphaCyber](https://t.me/AlphaCyber) 96 | 97 | [MosyDev](https://t.me/MosyDev) 98 | 99 | [Yones](https://t.me/AnonyDev) 100 | 101 | # [PlusTM](https://telegram.me/PlusTM) 102 | 103 | 104 | -------------------------------------------------------------------------------- /Setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | echo -e "Setup Started Please Wait..." 3 | echo -e ">>>>>>>>> @PlusTM <<<<<<<<<<" 4 | sleep 2 5 | sudo apt-get install python-pip 6 | pip install pyTelegramBotAPI 7 | git clone https://github.com/eternnoir/pyTelegramBotAPI.git 8 | cd pyTelegramBotAPI 9 | python setup.py install 10 | cd .. 11 | sudo apt-get install python-setuptools 12 | sudo apt-get install python-pip 13 | sudo apt-get install python-redis 14 | sudo pip install pyTelegramBotAPI 15 | apt-get install python setup-tools 16 | sudo pip install pyTelegramBotAPI —upgrade 17 | sudo apt-get update 18 | sudo apt-get install python2.7 19 | chmod +x Anti.sh 20 | echo -e "Thanks for Used AntiPlus" 21 | sleep 2 22 | echo -e "Please Set TOKEN and Sudo ID To AntiPlus.py" 23 | sleep 3 24 | echo -e "Type screen ./Anti.sh" 25 | --------------------------------------------------------------------------------