LukeSavefrogs

Untitled

Jun 9th, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import asyncio
  2. import datetime
  3. import os
  4. import time
  5. import traceback
  6. import requests
  7. import validators
  8. from random import randint
  9. import json
  10. import random
  11. import string
  12. from gtts import gTTS
  13. from pyrogram import Client, filters, idle
  14. from pyrogram.raw.functions.messages import StartBot, DeleteHistory
  15. from pyrogram.enums import ChatType, ParseMode, UserStatus
  16. from faker import Faker
  17. from pyrogram.raw.functions.account import UpdateNotifySettings
  18. from pyrogram.raw.base import InputPeer
  19. from pyrogram.raw.types import InputPeerNotifySettings, InputNotifyPeer, InputPeerChat
  20. from PIL import Image
  21. import math
  22. import speech_recognition as sr
  23. from pydub import AudioSegment
  24.  
  25. ubot = Client("killersession", api_id=1198947, api_hash="9e44f928c1062aeae2607ae8a6a043ef", lang_code="it")
  26. ubot.start()
  27.  
  28. IDSSS, usernamesss = (ubot.get_me()).id, (ubot.get_me()).username
  29. admin = [5677022032]
  30. data = "Data ancora non impostata"
  31. data_acquisto = str(datetime.date.today())
  32. statusse = False
  33. ignore = []
  34.  
  35.  
  36. class Database:
  37. def __init__(self, file_name: str):
  38. self.database = file_name
  39. with open(file_name, "w") as file:
  40. json.dump({"word": {}, "wordr": {}, "sticker": False, "animati": {}, "media": {}}, file)
  41.  
  42. async def save(self, update: dict):
  43. with open(self.database, "w") as f:
  44. json.dump(update, f)
  45.  
  46. async def load(self):
  47. with open(self.database, "r") as f:
  48. return json.load(f)
  49.  
  50. async def add_word(self, word: str, risposta: str):
  51. update = await self.load()
  52. update["word"][str(word)] = risposta
  53. await self.save(update)
  54. return risposta
  55.  
  56. async def add_wordr(self, word: str, risposta: str):
  57. update = await self.load()
  58. update["wordr"][str(word)] = risposta
  59. await self.save(update)
  60. return risposta
  61.  
  62. async def add_word_media(self, word: str, risposta):
  63. update = await self.load()
  64. update["media"][str(word)] = risposta
  65. await self.save(update)
  66. return risposta
  67.  
  68. async def add_word_animate(self, word: str, risposta: list):
  69. update = await self.load()
  70. update["animati"][str(word)] = risposta
  71. await self.save(update)
  72. return risposta
  73.  
  74.  
  75. # mute
  76. word = Database("word.json")
  77. mutati = []
  78. welcome_group = []
  79. mexwelcome = "benvenuto"
  80.  
  81. print("BotStatus[on]")
  82.  
  83.  
  84. @ubot.on_message(filters.new_chat_members)
  85. async def uuh(_, message):
  86. for user in message.new_chat_members:
  87. if user.is_self:
  88. pass
  89. else:
  90. if message.chat.id in welcome_group:
  91. await message.reply(mexwelcome, quote=True)
  92.  
  93.  
  94. # mute
  95. firekakka = {"mex": "Mutato bruh"}
  96.  
  97.  
  98. @ubot.on_message(filters.user("self") & filters.command("msgmute", "."))
  99. async def s(client, message):
  100. global firekakka
  101. p = message.text.replace(".msgmute", "")
  102. firekakka["mex"] = p
  103. await message.edit(f"**✅ Messaggio mute impostato ✅**")
  104.  
  105.  
  106. @ubot.on_message(filters.user("self") & filters.command("creator", "."))
  107. async def creator(client, message):
  108. await message.edit(
  109. f"🧑🏻‍💻<b> » UserBot Sviluppato da </b>@gxkyseller")
  110.  
  111.  
  112. @ubot.on_message(filters.user("self") & filters.command("mute", ".") & filters.private)
  113. async def mute(client, message):
  114. global mutati
  115. if message.chat.id in mutati:
  116. await message.edit("❌Utente già mutato❌")
  117. else:
  118. mutati.append(message.chat.id)
  119. await message.edit(firekakka["mex"])
  120.  
  121.  
  122. @ubot.on_message(filters.user("self") & filters.command("unmute", ".") & filters.private)
  123. def unmute(client, message):
  124. global mutati
  125. if message.chat.id in mutati:
  126. mutati.remove(message.chat.id)
  127. message.edit("✅Utente smutato✅")
  128. else:
  129. message.edit("✅L'utente non è mutato✅")
  130.  
  131.  
  132. @ubot.on_message(filters.incoming & filters.private)
  133. async def delete(client, message):
  134. global mutati
  135. if message.chat.id in mutati:
  136. await message.delete()
  137.  
  138.  
  139. # block unbock msg
  140. texts = {"mex": "Bloccato bruh"}
  141.  
  142.  
  143. @ubot.on_message(filters.user("self") & filters.command("msgblock", "."))
  144. async def setblock(client, message):
  145. global texts
  146. p = message.text.replace(".msgblock", "")
  147. texts["mex"] = p
  148. await message.edit(f"**✅ Messaggio block impostato ✅**")
  149.  
  150.  
  151. @ubot.on_message(filters.user("self") & filters.command("block", ".") & filters.private)
  152. async def block(client, message):
  153. global texts
  154. textss = texts["mex"]
  155. if message.reply_to_message:
  156. try:
  157. await client.block_user(message.reply_to_message.from_user.id)
  158. await message.edit(textss)
  159. except:
  160. await message.edit("**❌ Utente già bloccato ❌**")
  161. else:
  162. try:
  163. await client.block_user(message.chat.id)
  164. await message.edit(textss)
  165. except:
  166. await message.edit("**❌ Utente già bloccato ❌**")
  167.  
  168.  
  169. @ubot.on_message(filters.user("self") & filters.command("unblock", ".") & filters.private)
  170. async def block(client, message):
  171. global texts
  172. if message.reply_to_message:
  173. try:
  174. await client.unblock_user(message.reply_to_message.from_user.id)
  175. await message.edit("**✅ Utente sbloccato correttamente ✅**")
  176. except:
  177. await message.edit("**❌ Utente non bloccato ❌**")
  178.  
  179.  
  180. # verify
  181. @ubot.on_message(filters.user("self") & filters.command("verify", "."))
  182. async def verifys(client, message):
  183. resolved = await ubot.resolve_peer("@spambot")
  184. await ubot.invoke(StartBot(bot=resolved, peer=resolved, random_id=randint(1000, 9999), start_param="e"))
  185. # avvia spam bot
  186. await asyncio.sleep(1)
  187. async for messagess in ubot.get_chat_history("@spambot", 1):
  188. msg = messagess.text
  189. if msg.find("Good news") > -1 or msg.find("Buone notizie") > -1:
  190. await message.edit("**✅ Non sei limitato ✅**")
  191. else:
  192. await message.edit("**❌ Sei limitato ❌**")
  193.  
  194.  
  195. # afk
  196. afk = False
  197. approve = []
  198. text = {"mex": "Sono afk bruh"}
  199.  
  200.  
  201. @ubot.on_message(filters.user("self") & filters.command("msgafk", "."))
  202. async def setAFK(client, message):
  203. global text
  204. p = message.text.replace(".msgafk", "")
  205. text["mex"] = p
  206. await message.edit(f"**✅ Messaggio afk impostato ✅**")
  207.  
  208.  
  209. @ubot.on_message(filters.user("self") & filters.command("afk", "."))
  210. async def setAFK(client, message):
  211. global afk
  212. if afk == True:
  213. afk = False
  214. await message.edit("❌Afk Disattivato❌")
  215. else:
  216. afk = True
  217. await message.edit("✅Afk Attivato✅")
  218.  
  219.  
  220. @ubot.on_message(filters.incoming & filters.private & ~filters.bot, group=-1)
  221. async def funzioneafk(client, message):
  222. global afk, approve, text
  223. if afk == True and not message.chat.id in approve:
  224. await message.delete()
  225. await message.reply_text(text["mex"].replace("{testo}", message.text), quote=False)
  226.  
  227.  
  228. @ubot.on_message(filters.user("self") & filters.command("approve", ".") & filters.private & ~filters.bot)
  229. def accept(client, message):
  230. global approve
  231. if not message.chat.id in approve:
  232. approve.append(message.chat.id)
  233. message.edit("✅Utente Approvato✅")
  234. else:
  235. message.edit("❌Utente Già Approvato❌")
  236.  
  237.  
  238. @ubot.on_message(filters.user("self") & filters.command("disapprove", ".") & filters.private & ~filters.bot)
  239. def disapprove(client, message):
  240. global approve
  241. if message.chat.id in approve:
  242. approve.remove(message.chat.id)
  243. message.edit("❌Utente Disapprovato❌")
  244. else:
  245. message.edit("❌Utente Non Approvato❌")
  246.  
  247.  
  248. # info
  249. @ubot.on_message(filters.user("self") & filters.command("info", "."))
  250. async def info(client, message):
  251. await message.delete()
  252. bot = ""
  253. file_id = None
  254. if message.reply_to_message:
  255. info = await client.get_users(message.reply_to_message.from_user.id)
  256. if info.is_bot:
  257. bot += "✅"
  258. else:
  259. bot += "❌"
  260. try:
  261. async for photo in client.get_chat_photos(message.reply_to_message.from_user.id):
  262. file_id = photo.file_id
  263. await client.send_photo(message.chat.id, file_id, caption=f"""
  264. **🔎 Informazioni utente
  265.  
  266. • 💭 Nome: {info.first_name}
  267. • 🏷 Cognome: {info.last_name}
  268. • 💡 ID: {info.id}
  269. • ⚙️ Username: @{info.username}**
  270. • 🤖 Bot: {bot}
  271. • 📡DataCenter: {info.dc_id}
  272.  
  273. """)
  274. except:
  275. await client.send_message(message.chat.id, f"""
  276. **🔎 Informazioni utente
  277.  
  278. • 💭 Nome: {info.first_name}
  279. • 🏷 Cognome: {info.last_name}
  280. • 💡 ID: {info.id}
  281. • ⚙️ Username: @{info.username}**
  282. • 🤖 Bot: {bot}
  283. • 📡DataCenter: {info.dc_id}
  284.  
  285. """)
  286. else:
  287. ez = message.text.split(" ")[1]
  288. info = await client.get_users(ez)
  289. if info.is_bot:
  290. bot += "✅"
  291. else:
  292. bot += "❌"
  293. try:
  294. async for photo in client.get_chat_photos(message.reply_to_message.from_user.id):
  295. file_id = photo.file_id
  296. await client.send_photo(message.chat.id, file_id, caption=f"""
  297. **🔎 Informazioni utente
  298.  
  299. • 💭 Nome: {info.first_name}
  300. • 🏷 Cognome: {info.last_name}
  301. • 💡 ID: {info.id}
  302. • ⚙️ Username: @{info.username}**
  303. • 🤖 Bot: {bot}
  304. • 📡DataCenter: {info.dc_id}
  305.  
  306. """)
  307. except:
  308. await client.send_message(message.chat.id, f"""
  309. **🔎 Informazioni utente
  310.  
  311. • 💭 Nome: {info.first_name}
  312. • 🏷 Cognome: {info.last_name}
  313. • 💡 ID: {info.id}
  314. • ⚙️ Username: @{info.username}**
  315. • 🤖 Bot: {bot}
  316. • 📡DataCenter: {info.dc_id}
  317.  
  318. """)
  319.  
  320.  
  321. # infogroup
  322. @ubot.on_message(filters.user("self") & filters.command("infogruppo", "."))
  323. async def info(client, message):
  324. file_id = None
  325. canale = False
  326. try:
  327. chat_info = await client.get_chat(message.command[1])
  328. await message.edit(f"""
  329. **🔎 Informazioni gruppo/canale
  330.  
  331. • 💭 Nome: {chat_info.title}
  332. • 💡 ID: {chat_info.id}
  333. • ⚙️ Username: @{chat_info.username}
  334. • 👥​ Membri: {chat_info.members_count}**
  335. """)
  336. except:
  337. await message.edit("Errore componi bene il comando !")
  338.  
  339.  
  340. # id
  341. @ubot.on_message(filters.user("self") & filters.command("id", "."))
  342. async def id(client, message):
  343. if message.reply_to_message:
  344. try:
  345. await message.edit(
  346. f"<b>🆔 @{message.reply_to_message.from_user.username} ➯ <code>{message.reply_to_message.from_user.id}</code></b>")
  347. except:
  348. await message.edit("**❌ Non è un utente ❌**")
  349. else:
  350. try:
  351. p = message.text.split(" ")[1]
  352. ut = await client.get_users(p)
  353. await message.edit(f"<b>🆔 @{message.reply_to_message.from_user.username} ➯ <code>{ut.id}</code></b>")
  354. except:
  355. await message.edit("**❌ Non è un utente ❌**")
  356.  
  357.  
  358. # avviso
  359. textssss = {"mex": "Sta scadendo!"}
  360.  
  361.  
  362. @ubot.on_message(filters.user(admin) & filters.command("msgscadenza", "."))
  363. async def setavviso(client, message):
  364. global textssss
  365. p = message.text.replace(".msgscadenza", "")
  366. textssss["mex"] = p
  367. await message.edit(f"**✅ Messaggio avviso impostato ✅**")
  368.  
  369.  
  370. day = None
  371. month = None
  372. year = None
  373.  
  374. completed = f"{year}-{month}-{day}"
  375.  
  376.  
  377. @ubot.on_message(filters.user(admin) & filters.command("scadenza", "."))
  378. async def setavvisos(client, message):
  379. global textssss, data, day, month, year, completed
  380. days, day = int(message.text.split(" ")[1]), int(message.text.split(" ")[1])
  381. months, month = int(message.text.split(" ")[2]), int(message.text.split(" ")[2])
  382. years, year = int(message.text.split(" ")[3]), int(message.text.split(" ")[3])
  383. data = str(days) + "/" + str(months) + "/" + str(years)
  384. completed = f"{year}-{month}-{day}"
  385. await client.send_message(message.chat.id, textssss["mex"],
  386. schedule_date=datetime.datetime(year=years, month=months, day=days))
  387. await message.edit("Scadenza impostata !")
  388.  
  389.  
  390. @ubot.on_message(filters.incoming)
  391. async def sahdhasdhi(_, message):
  392. completeds = f"{year}-0{month}-{day}"
  393. if str(datetime.date.today()) == completed:
  394. print("Bye Bye")
  395. exit()
  396. elif str(datetime.date.today()) == completeds:
  397. print("Bye Bye")
  398. exit()
  399.  
  400.  
  401. # cmd
  402. @ubot.on_message(filters.user("self") & filters.command("cmd", "."))
  403. async def cmdssss(client, message):
  404. await message.edit("""
  405. - .cmd = fa vedere i comandi
  406.  
  407.  
  408.  
  409. Mute:
  410.  
  411. - .mute = muta un utente
  412.  
  413. - .unmute = smuta un utente
  414.  
  415. - .msgmute = mex quando muti una persona
  416.  
  417.  
  418.  
  419. Block:
  420.  
  421. - .block = blocca un utente
  422.  
  423. - .unblock = sblocca un utente
  424.  
  425. - .msgblock = imposta mex di quando blocchi
  426.  
  427.  
  428.  
  429. Afk:
  430.  
  431. - .msgafk (messaggio) = imposta mex afk
  432.  
  433. - .afk = attiva/disattia afk
  434.  
  435. - .approve = approva utente
  436.  
  437. - .disapprove = disapprova un utente
  438.  
  439. - .online = mette online nel cognome
  440.  
  441. - .offline = mette offline nel cognome
  442.  
  443. - .msgon (testo) = imposta mex online
  444.  
  445. - .msgoff (testo) = imposta mex offline
  446.  
  447. - .delstatus = toglie on/off dal cognome
  448.  
  449. - .autoafk = afk intelligente, si attiva quando sei off e viceversa quando sei on
  450.  
  451.  
  452.  
  453. Filtri:
  454.  
  455. - .addfiltro (comando, risposta al comando) = aggiunge filtro
  456.  
  457. - .remfiltro (comando) = elimina filtro
  458.  
  459. - .filtri = lista filtri
  460.  
  461.  
  462.  
  463. Reply:
  464.  
  465. - .addreply (parola a cui rispondere, risposta) = imposta reply
  466.  
  467. - .delreply (parola a cui rispondere) = elimina reply
  468.  
  469. - .replylist = lista reply
  470.  
  471. - .ignore = non andranno i reply in quella chat
  472.  
  473. - .unignore = andranno di nuovo i reply in quella chat
  474.  
  475.  
  476.  
  477. Admin:
  478.  
  479. - .msgscadenza (messaggio) = imposta mex avviso scadenza / cmd for admin
  480.  
  481. - .scadenza (giorno(numero), mese(numero), anno) = manda avviso della scadenza / cmd for admin
  482.  
  483.  
  484.  
  485. Generali:
  486.  
  487. - .verify = verifica se sei limitato
  488.  
  489. - .id (in reply o con tag) = dice id di un utente
  490.  
  491. - .chatid (in reply o con tag) = dice id di un utente o canale
  492.  
  493. - .info (in reply o con tag) = dice info di un utente
  494.  
  495. - .history (reply) = history di un utente (si basa su sangmata)
  496.  
  497. - .infofgruppo (tag) = dice info di un gruppo/canale
  498.  
  499. - .fnetban(id, motivazione) = fake netban
  500.  
  501. - .creator = creatore bot
  502.  
  503. - .expiry = ottieni giorno scadenza bot
  504.  
  505. - .status = status userbot
  506.  
  507. - .stats = statistiche chat
  508.  
  509. - .cloud = salva mex in reply nei mex salvati
  510.  
  511. - .fakeidentity = identità falsa
  512.  
  513. - .fakemail = mail falsa
  514.  
  515. - .percentuale (percentuale, numero) = calcolo percentuale
  516.  
  517. - .checkvoip (id/reply) = check voip
  518.  
  519. - .verifylink = verifica link
  520.  
  521. - .translate (lingua in cui tradurre / testo) = traduce
  522.  
  523. - .html (reply) = trasforma testo in html
  524.  
  525.  
  526.  
  527. Profilo:
  528.  
  529. - .nome (nome) = cambia nome
  530.  
  531. - .cognome (cognome) = cambia cognome
  532.  
  533. - .bio (bio) = cambia bio
  534.  
  535.  
  536.  
  537. Welcome:
  538.  
  539. - .welcome (chatid) = Imposta benvenuto nel gruppo
  540.  
  541. - .unwelcome (chatid) = toglie welcome in un gruppo
  542.  
  543. - .mexwelcome (mex) = imposta mex welcome
  544.  
  545.  
  546.  
  547. Spam:
  548.  
  549. - .spam (nuemro volte, mex) = spam mex tot volte
  550.  
  551. - .letterspam (parola) = invia lettera per lettera la parola
  552.  
  553. - .wordspam (mex) = invia parola per parola il mex
  554.  
  555. - .picspam (numero volte, link foto) = invia foto tot volte
  556.  
  557. - .spamreply (numero volte) = inoltra tot volte il mex in reply
  558.  
  559.  
  560.  
  561. Sticker:
  562.  
  563. - .addsticker (reply a una foto o uno sticker) = aggiunge sticker
  564.  
  565. - .stickermsg (reply a un messaggio) = Trasforma mex in uno sticker
  566.  
  567.  
  568.  
  569. Gmex:
  570.  
  571. - .addgroup (chatid con -) = aggiunge gruppo
  572.  
  573. - .remgroup (chatid con -) = rimuove gruppo
  574.  
  575. - .gmex (mex) = invia mex nella lista gruppi
  576.  
  577. - .listagmex = lista gruppi
  578.  
  579.  
  580. Filtri animati:
  581.  
  582. -.addfiltroanimato (nomecomando testo -|- per separare gli edit) = crea filtro animato
  583.  
  584. -.remfiltroanimato (nomecomando) = rimuove filtro animato
  585.  
  586. -.listanimati = mostra lista filtri animati
  587.  
  588.  
  589.  
  590. Filtri media:
  591. -.addfiltromedia (nomecomando reply ad una foto) = crea filtro media
  592.  
  593. -.remfiltromedia(nomecomando) = rimuove filtro media
  594.  
  595. -.listamedia = mostra lista filtri media
  596.  
  597.  
  598.  
  599. Chat:
  600.  
  601. - .purge (reply) = elimina tutti i mess a partire da quel mess
  602.  
  603. - .readall = legge tutto in una chat
  604.  
  605. - .autoread = attiva/disattiva autoread
  606.  
  607. - .readchat (chatid) = aggiuge chat alla lista
  608.  
  609. - .unreadchat (chatid) = rimuove chat alla lista
  610.  
  611. - .listread = lista autoreadchat
  612.  
  613. - .notifyon (tag/reply) = abilita le notifiche di una chat. Funziona anche via reply.
  614.  
  615. - .notifyoff (tag/reply) = disabilita le notifiche di una chat. Funziona anche via reply.
  616.  
  617.  
  618.  
  619. Forward:
  620.  
  621. - .forward (reply) = inoltra mex nella chat in lista forward
  622.  
  623. - .setforward (tag/id) = mette canale in lista
  624.  
  625. - .remforward (tag/id) = rimuove canale nella lista
  626.  
  627. - .cforward (reply + tag) = inoltra mex alla chat messa
  628.  
  629. - .listaforward = lista forward
  630.  
  631.  
  632.  
  633. Gruppi:
  634.  
  635. - .alltag = tagga tutti
  636.  
  637. - .kickme = esce dal gruppo
  638.  
  639. - .checktag = attiva/disattiva rispota a tag in automatico
  640.  
  641. - .msgtag (mex) = imposta mex checktag
  642.  
  643.  
  644.  
  645. Funny:
  646.  
  647. - .sega
  648.  
  649. - .pula
  650.  
  651. - .typespace (testo)
  652.  
  653. - .tts (testo)
  654.  
  655. - .transcriber (reply ad un audio)
  656. """,
  657. disable_web_page_preview=True)
  658.  
  659.  
  660. # qua ti lascio la lista come commento bye bye
  661. """
  662. - .cmd = fa vedere i comandi
  663.  
  664.  
  665.  
  666. Mute:
  667.  
  668. - .mute = muta un utente
  669.  
  670. - .unmute = smuta un utente
  671.  
  672. - .msgmute = mex quando muti una persona
  673.  
  674.  
  675.  
  676. Block:
  677.  
  678. - .block = blocca un utente
  679.  
  680. - .unblock = sblocca un utente
  681.  
  682. - .msgblock = imposta mex di quando blocchi
  683.  
  684.  
  685.  
  686. Afk:
  687.  
  688. - .msgafk (messaggio) = imposta mex afk
  689.  
  690. - .afk = attiva/disattia afk
  691.  
  692. - .approve = approva utente
  693.  
  694. - .disapprove = disapprova un utente
  695.  
  696. - .online = mette online nel cognome
  697.  
  698. - .offline = mette offline nel cognome
  699.  
  700. - .msgon (testo) = imposta mex online
  701.  
  702. - .msgoff (testo) = imposta mex offline
  703.  
  704. - .delstatus = toglie on/off dal cognome
  705.  
  706. - .autoafk = afk intelligente, si attiva quando sei off e viceversa quando sei on
  707.  
  708.  
  709.  
  710. Filtri:
  711.  
  712. - .addfiltro (comando, risposta al comando) = aggiunge filtro
  713.  
  714. - .remfiltro (comando) = elimina filtro
  715.  
  716. - .filtri = lista filtri
  717.  
  718.  
  719.  
  720. Reply:
  721.  
  722. - .addreply (parola a cui rispondere, risposta) = imposta reply
  723.  
  724. - .delreply (parola a cui rispondere) = elimina reply
  725.  
  726. - .replylist = lista reply
  727.  
  728. - .ignore = non andranno i reply in quella chat
  729.  
  730. - .unignore = andranno di nuovo i reply in quella chat
  731.  
  732.  
  733.  
  734. Admin:
  735.  
  736. - .msgscadenza (messaggio) = imposta mex avviso scadenza / cmd for admin
  737.  
  738. - .scadenza (giorno(numero), mese(numero), anno) = manda avviso della scadenza / cmd for admin
  739.  
  740.  
  741.  
  742. Generali:
  743.  
  744. - .verify = verifica se sei limitato
  745.  
  746. - .id (in reply o con tag) = dice id di un utente
  747.  
  748. - .chatid (in reply o con tag) = dice id di un utente o canale
  749.  
  750. - .info (in reply o con tag) = dice info di un utente
  751.  
  752. - .history (reply) = history di un utente (si basa su sangmata)
  753.  
  754. - .infofgruppo (tag) = dice info di un gruppo/canale
  755.  
  756. - .fnetban(id, motivazione) = fake netban
  757.  
  758. - .creator = creatore bot
  759.  
  760. - .expiry = ottieni giorno scadenza bot
  761.  
  762. - .status = status userbot
  763.  
  764. - .stats = statistiche chat
  765.  
  766. - .cloud = salva mex in reply nei mex salvati
  767.  
  768. - .fakeidentity = identità falsa
  769.  
  770. - .fakemail = mail falsa
  771.  
  772. - .percentuale (percentuale, numero) = calcolo percentuale
  773.  
  774. - .checkvoip (id/reply) = check voip
  775.  
  776. - .verifylink = verifica link
  777.  
  778. - .translate (lingua in cui tradurre / testo) = traduce
  779.  
  780. - .html (reply) = trasforma testo in html
  781.  
  782.  
  783.  
  784. Profilo:
  785.  
  786. - .nome (nome) = cambia nome
  787.  
  788. - .cognome (cognome) = cambia cognome
  789.  
  790. - .bio (bio) = cambia bio
  791.  
  792.  
  793.  
  794. Welcome:
  795.  
  796. - .welcome (chatid) = Imposta benvenuto nel gruppo
  797.  
  798. - .unwelcome (chatid) = toglie welcome in un gruppo
  799.  
  800. - .mexwelcome (mex) = imposta mex welcome
  801.  
  802.  
  803.  
  804. Spam:
  805.  
  806. - .spam (nuemro volte, mex) = spam mex tot volte
  807.  
  808. - .letterspam (parola) = invia lettera per lettera la parola
  809.  
  810. - .wordspam (mex) = invia parola per parola il mex
  811.  
  812. - .picspam (numero volte, link foto) = invia foto tot volte
  813.  
  814. - .spamreply (numero volte) = inoltra tot volte il mex in reply
  815.  
  816.  
  817.  
  818. Sticker:
  819.  
  820. - .addsticker (reply a una foto o uno sticker) = aggiunge sticker
  821.  
  822. - .stickermsg (reply a un messaggio) = Trasforma mex in uno sticker
  823.  
  824.  
  825.  
  826. Gmex:
  827.  
  828. - .addgroup (chatid con -) = aggiunge gruppo
  829.  
  830. - .remgroup (chatid con -) = rimuove gruppo
  831.  
  832. - .gmex (mex) = invia mex nella lista gruppi
  833.  
  834. - .listagmex = lista gruppi
  835.  
  836.  
  837. Filtri animati:
  838.  
  839. -.addfiltroanimato (nomecomando testo -|- per separare gli edit) = crea filtro animato
  840.  
  841. -.remfiltroanimato (nomecomando) = rimuove filtro animato
  842.  
  843. -.listanimati = mostra lista filtri animati
  844.  
  845.  
  846.  
  847. Filtri media:
  848. -.addfiltromedia (nomecomando reply ad una foto) = crea filtro media
  849.  
  850. -.remfiltromedia(nomecomando) = rimuove filtro media
  851.  
  852. -.listamedia = mostra lista filtri media
  853.  
  854.  
  855.  
  856. Chat:
  857.  
  858. - .purge (reply) = elimina tutti i mess a partire da quel mess
  859.  
  860. - .readall = legge tutto in una chat
  861.  
  862. - .autoread = attiva/disattiva autoread
  863.  
  864. - .readchat (chatid) = aggiuge chat alla lista
  865.  
  866. - .unreadchat (chatid) = rimuove chat alla lista
  867.  
  868. - .listread = lista autoreadchat
  869.  
  870. - .notifyon (tag/reply) = abilita le notifiche di una chat. Funziona anche via reply.
  871.  
  872. - .notifyoff (tag/reply) = disabilita le notifiche di una chat. Funziona anche via reply.
  873.  
  874.  
  875.  
  876. Forward:
  877.  
  878. - .forward (reply) = inoltra mex nella chat in lista forward
  879.  
  880. - .setforward (tag/id) = mette canale in lista
  881.  
  882. - .remforward (tag/id) = rimuove canale nella lista
  883.  
  884. - .cforward (reply + tag) = inoltra mex alla chat messa
  885.  
  886. - .listaforward = lista forward
  887.  
  888.  
  889.  
  890. Gruppi:
  891.  
  892. - .alltag = tagga tutti
  893.  
  894. - .kickme = esce dal gruppo
  895.  
  896. - .checktag = attiva/disattiva rispota a tag in automatico
  897.  
  898. - .msgtag (mex) = imposta mex checktag
  899.  
  900.  
  901.  
  902. Funny:
  903.  
  904. - .sega
  905.  
  906. - .pula
  907.  
  908. - .typespace (testo)
  909.  
  910. - .tts (testo)
  911.  
  912. - .transcriber (reply ad un audio)
  913. """
  914.  
  915.  
  916. # funny
  917. @ubot.on_message(filters.user("self") & filters.command("sega", "."))
  918. async def funny(client, message):
  919. await message.edit("8===👊🏻D")
  920. await asyncio.sleep(0.2)
  921. await message.edit("8==👊🏻=D")
  922. await asyncio.sleep(0.2)
  923. await message.edit("8===👊🏻D")
  924. await asyncio.sleep(0.2)
  925. await message.edit("8==👊🏻=D")
  926. await asyncio.sleep(0.2)
  927. await message.edit("8===👊🏻D💦​")
  928.  
  929.  
  930. @ubot.on_message(filters.user("self") & filters.command("pula", "."))
  931. async def funny(client, message):
  932. await message.edit("​🔵​🔴​")
  933. await asyncio.sleep(0.4)
  934. await message.edit("🔴​​🔵​")
  935. await asyncio.sleep(0.4)
  936. await message.edit("​🔵​🔴​")
  937. await asyncio.sleep(0.4)
  938. await message.edit("🔴​​🔵​")
  939. await asyncio.sleep(0.4)
  940. await message.edit("La pula dice che fai schifo")
  941.  
  942. @ubot.on_message(filters.user("self") & filters.command("marocco", "."))
  943. async def funny(client, message):
  944. await message.edit("🇲🇦 » Il marocco ha vinto la coppa!")
  945. await asyncio.sleep(1.00)
  946. await message.edit("Fammi mettere gli occhiali e vediamo")
  947. await asyncio.sleep(1.00)
  948. await message.edit("​Ah no,il kebab era")
  949. await asyncio.sleep(1.00)
  950. await message.edit("Marocco hidel ommok")
  951. await asyncio.sleep(0.6)
  952. await message.edit("😂")
  953.  
  954.  
  955. @ubot.on_message(filters.user("self") & filters.command("a", "."))
  956. async def funny(client, message):
  957. await message.edit("ᵃ")
  958.  
  959.  
  960. @ubot.on_message(filters.user("self") & filters.command("typespace", "."))
  961. async def font(client, message):
  962. sp = message.text.split(" ", 1)
  963. if len(message.command) > 1:
  964. text = sp[1]
  965. mex = ""
  966. for i in range(len(text)):
  967. mex = mex + text[i]
  968. await asyncio.wait([message.edit("`" + mex + " |`")])
  969. await asyncio.sleep(0.1)
  970. await asyncio.wait([message.edit("`" + mex + " ‏‏‎`")])
  971. await asyncio.sleep(0.1)
  972. if i == (len(text) - 1):
  973. await asyncio.wait([message.edit("`" + text + "`")])
  974.  
  975.  
  976. @ubot.on_message(filters.user("self") & filters.command("transcriber", "."))
  977. async def audiorec(_, message):
  978. await message.delete()
  979. if message.reply_to_message.voice or message.reply_to_message.audio:
  980. if message.reply_to_message.voice:
  981. msg = await message.reply_text("```Carico l'audio...```")
  982. PercorsoFile = await ubot.download_media(message.reply_to_message.voice.file_id)
  983. pcf = PercorsoFile.replace("ogg", "wav")
  984. AudioSegment.from_ogg(PercorsoFile).export(pcf, format="wav")
  985. r = sr.Recognizer()
  986. tt = "**Testo del audio:**\n\n"
  987. with sr.AudioFile(pcf) as source:
  988. audio_data = r.record(source)
  989. text = r.recognize_google(audio_data, language="it-IT")
  990. tt += text
  991. os.remove(PercorsoFile)
  992. os.remove(pcf)
  993. await msg.delete()
  994. await message.reply_text(tt)
  995.  
  996.  
  997. # tts
  998. @ubot.on_message(filters.user("self") & filters.command("tts", "."))
  999. async def tts(client, message):
  1000. k = message.text.split(" ", 1)
  1001. if k.__len__() == 2:
  1002. await message.delete()
  1003. tts = gTTS(text=k[1], lang='it')
  1004. tts.save("tts.ogg")
  1005. await client.send_voice(message.chat.id, "tts.ogg")
  1006. os.remove("tts.ogg")
  1007. else:
  1008. await message.edit("**❌ERRORE:\nSpecificare il testo ❌**")
  1009.  
  1010.  
  1011. # Alltag
  1012. @ubot.on_message(filters.user("self") & filters.command("alltag", ".") & filters.group)
  1013. async def tagaal(client, message):
  1014. await message.delete()
  1015. text = ""
  1016. async for member in ubot.get_chat_members(message.chat.id):
  1017. if not member.user.username == None:
  1018. text += "@" + str(member.user.username) + "\n"
  1019. await client.send_message(message.chat.id, text)
  1020.  
  1021.  
  1022. # kickme
  1023. @ubot.on_message(filters.user("self") & filters.command("kickme", ".") & filters.group)
  1024. async def kickme(client, message):
  1025. await message.delete()
  1026. try:
  1027. await client.leave_chat(message.chat.id, delete=True)
  1028. except:
  1029. pass
  1030.  
  1031.  
  1032. # checktag
  1033. checktag = False
  1034. msgccc = "Non Taggarmi"
  1035.  
  1036.  
  1037. @ubot.on_message(filters.user("self") & filters.command("checktag", "."))
  1038. async def kicksdme(client, message):
  1039. global checktag
  1040. if checktag:
  1041. checktag = False
  1042. await message.edit("❌ Checktag Disattivato ❌")
  1043. else:
  1044. checktag = True
  1045. await message.edit("✅ Checktag Attivato ✅")
  1046.  
  1047.  
  1048. @ubot.on_message(filters.user("self") & filters.command("msgtag", "."))
  1049. async def dasdasdwasdsw(client, message):
  1050. global msgtag
  1051. if len(message.command) > 1:
  1052. rr = message.text.replace(".msgtag", "")
  1053. msgtag = rr
  1054. await message.edit("Fatto!")
  1055. else:
  1056. await message.edit("Metti un testo !")
  1057.  
  1058.  
  1059. @ubot.on_message(filters.command(usernamesss, "@") & filters.group)
  1060. async def dasdasdwasdsw(client, message):
  1061. if checktag:
  1062. await message.reply(msgtag, quote=True)
  1063.  
  1064.  
  1065. # history
  1066. @ubot.on_message(filters.user("self") & filters.command("history", "."))
  1067. async def history(client, message):
  1068. if message.reply_to_message:
  1069. resolved = await client.resolve_peer("@sangmatainfo_bot")
  1070. await client.invoke(DeleteHistory(peer=resolved, max_id=0, just_clear=False, revoke=True))
  1071. try:
  1072. await message.reply_to_message.forward("@sangmatainfo_bot")
  1073. await message.delete()
  1074. await asyncio.sleep(2)
  1075. async for messagess in ubot.get_chat_history("@sangmatainfo_bot", 2):
  1076. msg = messagess
  1077. async for messagess in ubot.get_chat_history("@sangmatainfo_bot", 1):
  1078. msgg = messagess
  1079. if msg.text == "Forward any message to this chat to see user history.":
  1080. await client.send_message(message.reply_to_message.chat.id,
  1081. "**❌ SangMata non può prendere la history ❌**")
  1082. else:
  1083. await msg.forward(message.reply_to_message.chat.id)
  1084. try:
  1085. await msgg.forward(message.reply_to_message.chat.id)
  1086. except:
  1087. pass
  1088. except:
  1089. traceback.print_exc()
  1090. try:
  1091. await message.edit("**❌ Errore controlla il terminale! ❌**")
  1092. except:
  1093. await client.send_message(message.reply_to_message.chat.id, "**❌ Errore controlla il terminale! ❌**")
  1094. else:
  1095. await message.edit("**❌ Devi rispondere ad un messaggio! ❌**")
  1096.  
  1097.  
  1098. # forward
  1099. channel = "vuoto"
  1100.  
  1101.  
  1102. @ubot.on_message(filters.user("self") & filters.command("setforward", "."))
  1103. async def setfw(client, message):
  1104. global channel
  1105. c = message.text.split(" ")[1]
  1106. if not channel == "vuoto":
  1107. try:
  1108. channel.append(int(c))
  1109. except:
  1110. channel.append(c)
  1111. else:
  1112. channel = []
  1113. try:
  1114. channel.append(int(c))
  1115. except:
  1116. channel.append(c)
  1117. await message.edit("**✅ Channel forward impostato correttamente ✅**")
  1118.  
  1119.  
  1120. @ubot.on_message(filters.user("self") & filters.command("forward", "."))
  1121. async def fw(client, message):
  1122. global channel
  1123. if not channel == "vuoto":
  1124. if message.reply_to_message:
  1125. lista = ""
  1126. try:
  1127. for i in channel:
  1128. lista += str(i) + "\n"
  1129. try:
  1130. await message.reply_to_message.forward(int(i))
  1131. except:
  1132. await message.reply_to_message.forward(i)
  1133. await message.edit(f"**✅ Inoltrato correttamente a {lista}✅**")
  1134. except:
  1135. traceback.print_exc()
  1136. await message.edit("**❌ Errore: controlla se sono admin nel channel o la tag è giusta ! ❌**")
  1137. else:
  1138. await message.edit("**❌ Devi rispondere ad un messaggio ! ❌**")
  1139. else:
  1140. await message.edit("**❌ Nessun canale impostato usa ❌:\n\n.setforward @channel")
  1141.  
  1142.  
  1143. @ubot.on_message(filters.user("self") & filters.command("cforward", "."))
  1144. async def fws(client, message):
  1145. if message.reply_to_message:
  1146. if len(message.command) > 1:
  1147. try:
  1148. await message.reply_to_message.forward(int(message.command[1]))
  1149. except:
  1150. await message.reply_to_message.forward(message.command[1])
  1151. await message.edit("Fatto!")
  1152. else:
  1153. await message.edit("Riprova ! .cforward (reply + tag/id chat in cui inoltrare")
  1154. else:
  1155. await message.edit("Riprova ! .cforward (reply + tag/id chat in cui inoltrare")
  1156.  
  1157.  
  1158. @ubot.on_message(filters.user("self") & filters.command("listaforward", "."))
  1159. async def reasdwsdaddwmg(client, message):
  1160. global channel
  1161. lista = "Lista forward:\n\n"
  1162. if not channel == "vuoto":
  1163. for g in channel:
  1164. try:
  1165. lista = "\n" + str(g)
  1166. except:
  1167. pass
  1168. else:
  1169. lista = "Vuoto"
  1170. await message.edit(lista)
  1171.  
  1172.  
  1173. @ubot.on_message(filters.user("self") & filters.command("remforward", "."))
  1174. async def resdasasdwasmg(client, message):
  1175. global channel
  1176. if not channel == "vuoto":
  1177. try:
  1178. channel.remove(int(message.command[1]))
  1179. except:
  1180. channel.remove(message.command[1])
  1181. pass
  1182. await message.edit(f"**❌ Chat rimossa ❌**")
  1183.  
  1184.  
  1185. # notifyon
  1186. @ubot.on_message(filters.user("self") & filters.command("notifyon", "."))
  1187. async def nton(_, message):
  1188. if len(message.command) > 1:
  1189. try:
  1190. info = await ubot.get_users(int(message.command[1]))
  1191. except:
  1192. info = await ubot.get_users(message.command[1])
  1193. try:
  1194. await ubot.invoke(UpdateNotifySettings(InputNotifyPeer(InputPeer(InputPeerChat(chat_id=info.id))),
  1195. InputPeerNotifySettings(silent=False)))
  1196. except:
  1197. pass
  1198. await message.edit("Fatto !")
  1199. elif message.reply_to_message:
  1200. try:
  1201. await ubot.invoke(UpdateNotifySettings(
  1202. InputNotifyPeer(InputPeer(InputPeerChat(chat_id=message.reply_to_message.from_user.id))),
  1203. InputPeerNotifySettings(silent=False)))
  1204. except:
  1205. pass
  1206. await message.edit("Fatto !")
  1207. else:
  1208. await message.edit("Riprova !")
  1209.  
  1210.  
  1211. # notifyoff
  1212. @ubot.on_message(filters.user("self") & filters.command("notifyoff", "."))
  1213. async def ntoff(_, message):
  1214. if len(message.command) > 1:
  1215. try:
  1216. info = await ubot.get_users(int(message.command[1]))
  1217. except:
  1218. info = await ubot.get_users(message.command[1])
  1219. try:
  1220. await ubot.invoke(UpdateNotifySettings(InputNotifyPeer(InputPeer(InputPeerChat(chat_id=info.id))),
  1221. InputPeerNotifySettings(silent=True)))
  1222. except:
  1223. pass
  1224. await message.edit("Fatto !")
  1225. elif message.reply_to_message:
  1226. try:
  1227. await ubot.invoke(UpdateNotifySettings(
  1228. InputNotifyPeer(InputPeer(InputPeerChat(chat_id=message.reply_to_message.from_user.id))),
  1229. InputPeerNotifySettings(silent=True)))
  1230. except:
  1231. pass
  1232. await message.edit("Fatto !")
  1233. else:
  1234. await message.edit("Riprova !")
  1235.  
  1236.  
  1237. # autoread
  1238. autoread = False
  1239. autoreads = []
  1240.  
  1241.  
  1242. @ubot.on_message(filters.user("self") & filters.command("autoread", "."))
  1243. async def setwqeqweqweqAFK(client, message):
  1244. global autoread
  1245. if autoread:
  1246. autoread = False
  1247. await message.edit("❌ Autoread Disattivato ❌")
  1248. else:
  1249. autoread = True
  1250. await message.edit("✅ Autoread Attivato ✅")
  1251.  
  1252.  
  1253. @ubot.on_message(filters.user("self") & filters.command("readchat", "."))
  1254. async def addsg(client, message):
  1255. global autoreads
  1256. p = message.text.split(" ")[1]
  1257. autoreads.append(int(p))
  1258. await message.edit(f"**✅ Chat aggiunta ✅**")
  1259.  
  1260.  
  1261. @ubot.on_message(filters.user("self") & filters.command("unreadchat ", "."))
  1262. async def resmg(client, message):
  1263. global autoreads
  1264. p = message.text.split(" ")[1]
  1265. autoreads.remove(int(p))
  1266. await message.edit(f"**❌ Chat rimosso ❌**")
  1267.  
  1268.  
  1269. @ubot.on_message(filters.user("self") & filters.command("listaread", "."))
  1270. async def reasdwdwmg(client, message):
  1271. global autoreads
  1272. lista = "Lista gruppi:\n\n"
  1273. for g in autoreads:
  1274. try:
  1275. lista = "\n" + str(g)
  1276. except:
  1277. pass
  1278. await message.edit(lista)
  1279.  
  1280.  
  1281. @ubot.on_message(filters.incoming & filters.chat(autoreads))
  1282. async def delqweqweqetswe(client, message):
  1283. global autoreads
  1284. if autoread:
  1285. await ubot.read_chat_history(message.chat.id)
  1286.  
  1287.  
  1288. # purge
  1289. error = False
  1290.  
  1291.  
  1292. @ubot.on_message(filters.user("self") & filters.command("purge", ".") & filters.private)
  1293. async def purge(client, message):
  1294. global error
  1295. error = False
  1296. if message.reply_to_message:
  1297. try:
  1298. start = message.reply_to_message.id
  1299. while True:
  1300. if not error:
  1301. await ubot.delete_messages(message.chat.id, start)
  1302. start += 1
  1303. else:
  1304. error = False
  1305. break
  1306. except:
  1307. error = True
  1308. else:
  1309. await client.send_message(message.chat.id, "Va usato in reply !")
  1310.  
  1311.  
  1312. # readall
  1313. @ubot.on_message(filters.user("self") & filters.command("readall", "."))
  1314. async def readall(client, message):
  1315. await ubot.read_chat_history(message.chat.id)
  1316. await message.edit("Letto!")
  1317.  
  1318.  
  1319. # gmex
  1320. gruppi = {"group": []}
  1321.  
  1322.  
  1323. @ubot.on_message(filters.user("self") & filters.command("addgroup", "."))
  1324. async def addg(client, message):
  1325. global gruppi
  1326. p = message.text.split(" ")[1]
  1327. info = await client.get_chat(p)
  1328. gruppi["group"].append(info.id)
  1329. await message.edit(f"**✅ Gruppo aggiunto ✅**")
  1330.  
  1331.  
  1332. @ubot.on_message(filters.user("self") & filters.command("remgroup", "."))
  1333. async def remg(client, message):
  1334. global gruppi
  1335. p = message.text.split(" ")[1]
  1336. info = await client.get_chat(p)
  1337. gruppi["group"].remove(info.id)
  1338. await message.edit(f"**❌ Gruppo rimosso ❌**")
  1339.  
  1340.  
  1341. @ubot.on_message(filters.user("self") & filters.command("gmex", "."))
  1342. async def remg(client, message):
  1343. global gruppi
  1344. p = message.text.replace(".gmex", "")
  1345. for g in gruppi["group"]:
  1346. try:
  1347. await client.send_message(g, p)
  1348. except:
  1349. pass
  1350. await message.edit("**✅ Gmex completato ✅**")
  1351.  
  1352.  
  1353. @ubot.on_message(filters.user("self") & filters.command("listagmex", "."))
  1354. async def remg(client, message):
  1355. global gruppi
  1356. lista = "Lista gruppi:\n\n"
  1357. for g in gruppi["group"]:
  1358. try:
  1359. lista = "\n" + str(g)
  1360. except:
  1361. pass
  1362. await message.edit(lista)
  1363.  
  1364.  
  1365. # stickermsg
  1366. @ubot.on_message(filters.user("self") & filters.command("stickermsg", "."))
  1367. async def qbot(client, message):
  1368. if message.reply_to_message:
  1369. await message.delete()
  1370. resolved = await client.resolve_peer("@QuotLyBot")
  1371. await ubot.invoke(StartBot(bot=resolved, peer=resolved, random_id=randint(1000, 9999), start_param="e"))
  1372. await asyncio.sleep(1)
  1373. await message.reply_to_message.forward("@QuotLyBot")
  1374. await asyncio.sleep(5)
  1375. async for messagess in ubot.get_chat_history("@QuotLyBot", 1):
  1376. msg = messagess
  1377. await msg.forward(message.reply_to_message.chat.id)
  1378. else:
  1379. await message.edit("**❌ Devi rispondere ad un messaggio! ❌**")
  1380.  
  1381.  
  1382. # addSticker
  1383.  
  1384. def resize_photo(file):
  1385. im = Image.open(file)
  1386. maxsize = (512, 512)
  1387. if (im.width and im.height) < 512:
  1388. size1 = im.width
  1389. size2 = im.height
  1390. if im.width > im.height:
  1391. image = Image.open(file)
  1392. new_image = image.resize(maxsize)
  1393. new_image.save(file)
  1394. else:
  1395. scale = 512 / size2
  1396. size1new = size1 * scale
  1397. size2new = 512
  1398. size1new = math.floor(size1new)
  1399. size2new = math.floor(size2new)
  1400. sizenew = (size1new, size2new)
  1401. im = im.resize(sizenew)
  1402. size1new = math.floor(size1new)
  1403. size2new = math.floor(size2new)
  1404. sizenew = (size1new, size2new)
  1405. im = im.resize(sizenew)
  1406. else:
  1407. im.thumbnail(maxsize)
  1408. im.save(file, 'PNG')
  1409.  
  1410.  
  1411. updatesss = json.load(open("word.json"))
  1412. sticker_pack = updatesss["sticker"]
  1413. file = None
  1414.  
  1415.  
  1416. @ubot.on_message(filters.user("self") & filters.command("addsticker", "."))
  1417. async def stickers(client, message):
  1418. global sticker_pack, file
  1419. if not sticker_pack:
  1420. if message.reply_to_message:
  1421. if message.reply_to_message.sticker:
  1422. await message.edit("Caricamento...")
  1423. if message.reply_to_message.sticker.mime_type == "application/x-tgsticker":
  1424. file = await message.reply_to_message.download(file_name="sticker.tgs")
  1425. else:
  1426. file = await message.reply_to_message.download(file_name="sticker.png")
  1427. elif message.reply_to_message.photo:
  1428. file = await message.reply_to_message.download(file_name="sticker.png")
  1429. resize_photo(file)
  1430. resolved = await ubot.resolve_peer("@stickers")
  1431. await ubot.invoke(StartBot(bot=resolved, peer=resolved, random_id=randint(1000, 9999), start_param="e"))
  1432. await asyncio.sleep(1)
  1433. async for messagess in ubot.get_chat_history("@stickers", 1):
  1434. msg = messagess.text
  1435. if msg.find("Ciao") > -1:
  1436. await ubot.send_message("@stickers", "/newpack")
  1437. async for messagesss in ubot.get_chat_history("@stickers", 1):
  1438. msgg = messagesss.text
  1439. if msgg.find("Evviva") > -1:
  1440. await ubot.send_message("@stickers", "stickerspackbyub69")
  1441. async for messagessss in ubot.get_chat_history("@stickers", 1):
  1442. msggg = messagessss.text
  1443. if msggg.find("Ottimo") > -1:
  1444. await ubot.send_document("@stickers", document=file)
  1445. async for messagesssss in ubot.get_chat_history("@stickers", 1):
  1446. msgggg = messagesssss.text
  1447. if msgggg.find("Grazie") > -1:
  1448. await ubot.send_message("@stickers", "🔥​")
  1449. async for messagessssss in ubot.get_chat_history("@stickers", 1):
  1450. msggggg = messagessssss.text
  1451. if msggggg.find("Congratulazioni") > -1:
  1452. await ubot.send_message("@stickers", "/publish")
  1453. await asyncio.sleep(5)
  1454. await ubot.send_message("@stickers", "/skip")
  1455. async for messagesssssss in ubot.get_chat_history("@stickers", 1):
  1456. msgggggg = messagesssssss.text
  1457. if msgggggg.find("Fornisci") > -1:
  1458. await ubot.send_message("@stickers", "GxkyDeveloper" + str(IDSSS))
  1459. sticker_pack = True
  1460. newupdate = json.load(open("word.json"))
  1461. newupdate["sticker"] = True
  1462. await word.save(newupdate)
  1463. await message.edit("OK! Link pack: https://t.me/addstickers/GxkyDeveloper" + str(IDSSS))
  1464. else:
  1465. await message.edit("**❌ Devi rispondere ad un messaggio! ❌**")
  1466. else:
  1467. if message.reply_to_message:
  1468. if message.reply_to_message.sticker:
  1469. await message.edit("Caricamento...")
  1470. if message.reply_to_message.sticker.mime_type == "application/x-tgsticker":
  1471. file = await message.reply_to_message.download(file_name="sticker.tgs")
  1472. else:
  1473. file = await message.reply_to_message.download(file_name="sticker.png")
  1474. elif message.reply_to_message.photo:
  1475. file = await message.reply_to_message.download(file_name="sticker.png")
  1476. resize_photo(file)
  1477. resolved = await ubot.resolve_peer("@stickers")
  1478. await ubot.invoke(StartBot(bot=resolved, peer=resolved, random_id=randint(1000, 9999), start_param="e"))
  1479. await asyncio.sleep(1)
  1480. async for messagess in ubot.get_chat_history("@stickers", 1):
  1481. msg = messagess.text
  1482. if msg.find("Ciao") > -1:
  1483. await ubot.send_message("@stickers", "/addsticker")
  1484. async for messagesss in ubot.get_chat_history("@stickers", 1):
  1485. msgg = messagesss.text
  1486. if msgg.find("Scegli") > -1:
  1487. await ubot.send_message("@stickers", "GxkyDeveloper" + str(IDSSS))
  1488. async for messagessss in ubot.get_chat_history("@stickers", 1):
  1489. msggg = messagessss.text
  1490. if msggg.find("Ottimo") > -1:
  1491. await ubot.send_document("@stickers", document=file)
  1492. async for messagesssss in ubot.get_chat_history("@stickers", 1):
  1493. msgggg = messagesssss.text
  1494. if msgggg.find("Grazie") > -1:
  1495. await ubot.send_message("@stickers", "🔥​")
  1496. async for messagessssss in ubot.get_chat_history("@stickers", 1):
  1497. msggggg = messagessssss.text
  1498. if msggggg.find("Congratulazioni") > -1:
  1499. await ubot.send_message("@stickers", "/publish")
  1500. await asyncio.sleep(5)
  1501. await ubot.send_message("@stickers", "/skip")
  1502. async for messagesssssss in ubot.get_chat_history("@stickers", 1):
  1503. msgggggg = messagesssssss.text
  1504. if msgggggg.find("Fornisci") > -1:
  1505. await ubot.send_message("@stickers", "GxkyDeveloper" + str(IDSSS))
  1506.  
  1507. await message.edit("OK! Link pack: https://t.me/addstickers/GxkyDeveloper" + str(IDSSS))
  1508. else:
  1509. await message.edit("**❌ Devi rispondere ad un messaggio! ❌**")
  1510. # await ubot.invoke(CreateStickerSet(message.from_user.id, title="StickerPackUB69", short_name="StickerPackBBBB", ))
  1511.  
  1512.  
  1513. # spam
  1514. @ubot.on_message(filters.user("self") & filters.command("spam", "."))
  1515. async def spam(client, message):
  1516. await message.delete()
  1517. r = message.text.replace(f".spam {message.command[1]}", "")
  1518. for i in range(0, int(message.command[1])):
  1519. await client.send_message(message.chat.id, r)
  1520.  
  1521.  
  1522. @ubot.on_message(filters.user("self") & filters.command("letterspam", "."))
  1523. async def spam(client, message):
  1524. await message.delete()
  1525. for i in message.command[1]:
  1526. await client.send_message(message.chat.id, i)
  1527.  
  1528.  
  1529. @ubot.on_message(filters.user("self") & filters.command("wordspam", "."))
  1530. async def spam(client, message):
  1531. await message.delete()
  1532. count = 0
  1533. for i in message.command:
  1534. if count != 0:
  1535. await client.send_message(message.chat.id, i)
  1536. else:
  1537. count += 1
  1538.  
  1539.  
  1540. @ubot.on_message(filters.user("self") & filters.command("picspam", "."))
  1541. async def spam(client, message):
  1542. await message.delete()
  1543. try:
  1544. for i in range(0, int(message.command[1])):
  1545. await client.send_photo(message.chat.id, message.command[2])
  1546. except:
  1547. await client.send_message(message.chat.id, "Link non valido / non messo numero di volte !")
  1548.  
  1549.  
  1550. @ubot.on_message(filters.user("self") & filters.command("spamreply", "."))
  1551. async def spam(client, message):
  1552. await message.delete()
  1553. if message.reply_to_message:
  1554. try:
  1555. for i in range(0, int(message.command[1])):
  1556. await message.reply_to_message.forward(message.chat.id)
  1557. except:
  1558. await client.send_message(message.chat.id, "Riprova !")
  1559. else:
  1560. await client.send_message(message.chat.id, "Va usato in reply")
  1561.  
  1562.  
  1563. # welcome
  1564. @ubot.on_message(filters.user("self") & filters.command("welcome", "."))
  1565. async def autasdasdo(client, message):
  1566. global welcome_group
  1567. if len(message.command) > 0:
  1568. try:
  1569. welcome_group.append(int(message.command[1]))
  1570. await message.edit("Welcome aggiunto !")
  1571. except:
  1572. await message.edit("ChatID non valido !")
  1573. else:
  1574. await message.edit("Devi inserire il chatID")
  1575.  
  1576.  
  1577. @ubot.on_message(filters.user("self") & filters.command("unwelcome", "."))
  1578. async def autasdao(client, message):
  1579. global welcome_group
  1580. if len(message.command) > 0:
  1581. try:
  1582. welcome_group.remove(int(message.command[1]))
  1583. await message.edit("Welcome rimosso da questo gruppo !")
  1584. except:
  1585. await message.edit("ChatID non valido !")
  1586. else:
  1587. await message.edit("Devi inserire il chatID")
  1588.  
  1589.  
  1590. @ubot.on_message(filters.user("self") & filters.command("mexwelcome", "."))
  1591. async def autasdao(client, message):
  1592. global mexwelcome
  1593. if len(message.command) > 0:
  1594. mexwelcome = message.text.replace(".mexwelcome", "")
  1595. await message.edit("Welcome mex impostato !")
  1596. else:
  1597. await message.edit("Devi inserire il messaggio")
  1598.  
  1599.  
  1600. # auto-status
  1601. @ubot.on_message(filters.user("self") & filters.command("autoafk", "."))
  1602. async def auto(client, message):
  1603. global statusse
  1604. if not statusse:
  1605. statusse = True
  1606. await message.edit(f"**✅ Autoafk attivato ✅**")
  1607. else:
  1608. statusse = False
  1609. await message.edit("**❌ Autoafk disattivato ❌**")
  1610.  
  1611.  
  1612. @ubot.on_user_status()
  1613. async def autosss(client, message):
  1614. global statusse, afk
  1615. if statusse:
  1616. p = await client.get_me()
  1617. if p.status == UserStatus.ONLINE:
  1618. afk = False
  1619. else:
  1620. afk = True
  1621.  
  1622.  
  1623. # Online
  1624. msgon = "online"
  1625. msgoff = "offline"
  1626.  
  1627.  
  1628. @ubot.on_message(filters.user("self") & filters.command("online", "."))
  1629. async def online(client, message):
  1630. await client.update_profile(last_name=msgon)
  1631. await message.edit(f"Ho messo {msgon} nel cognome correttamente✅")
  1632.  
  1633.  
  1634. # Offline
  1635. @ubot.on_message(filters.user("self") & filters.command("offline", "."))
  1636. async def off(client, message):
  1637. await client.update_profile(last_name="OFFLINE❌")
  1638. await message.edit(f"Ho messo {msgoff} nel cognome correttamente✅")
  1639.  
  1640.  
  1641. # msgon
  1642. @ubot.on_message(filters.user("self") & filters.command("msgon", "."))
  1643. async def msgonss(client, message):
  1644. global msgon
  1645. msgon = message.text.replace(".msgon", "")
  1646. await message.edit(f"**✅ Messaggio online impostato ✅**")
  1647.  
  1648.  
  1649. # msgoff
  1650. @ubot.on_message(filters.user("self") & filters.command("msgoff", "."))
  1651. async def msgoffss(client, message):
  1652. global msgoff
  1653. msgoff = message.text.replace(".msgoff", "")
  1654. await message.edit(f"**✅ Messaggio offline impostato ✅**")
  1655.  
  1656.  
  1657. # NotStatus
  1658. @ubot.on_message(filters.user("self") & filters.command("delstatus", "."))
  1659. async def delst(client, message):
  1660. await client.update_profile(last_name="")
  1661. await message.edit("Ho rimosso lo status dal cognome correttamente✅")
  1662.  
  1663.  
  1664. # nome
  1665. @ubot.on_message(filters.user("self") & filters.command("nome", "."))
  1666. async def online(client, message):
  1667. p = message.text.split(" ")[1]
  1668. await client.update_profile(first_name=p)
  1669. await message.edit(f"Ho messo {p} nel nome correttamente✅")
  1670.  
  1671.  
  1672. # cognome
  1673. @ubot.on_message(filters.user("self") & filters.command("cognome", "."))
  1674. async def online(client, message):
  1675. p = message.text.split(" ")[1]
  1676. await client.update_profile(last_name=p)
  1677. await message.edit(f"Ho messo {p} nel cognome correttamente✅")
  1678.  
  1679.  
  1680. # bio
  1681. @ubot.on_message(filters.user("self") & filters.command("bio", "."))
  1682. async def online(client, message):
  1683. p = message.text.split(" ")[1]
  1684. await client.update_profile(bio=p)
  1685. await message.edit(f"Ho messo {p} nella bio correttamente✅")
  1686.  
  1687.  
  1688. # vrlink
  1689. @ubot.on_message(filters.user("self") & filters.command("verifylink", "."))
  1690. async def linkvr(client, message):
  1691. if validators.url(message.command[1]):
  1692. await message.edit("Link valido !")
  1693. else:
  1694. await message.edit("Link NON valido !")
  1695.  
  1696.  
  1697. # translate
  1698. @ubot.on_message(filters.user("self") & filters.command("translate", "."))
  1699. async def trans(client, message):
  1700. url = f"https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl={message.command[1]}&dt=t&q={message.text.replace(f'.translate {message.command[1]}', '')}"
  1701. await message.edit(json.loads(requests.get(url).text)[0][0][0])
  1702.  
  1703.  
  1704. # html
  1705. @ubot.on_message(filters.user("self") & filters.command("html", "."))
  1706. async def trans(client, message):
  1707. if message.reply_to_message:
  1708. await message.edit(message.reply_to_message.text.html, parse_mode=ParseMode.DISABLED)
  1709.  
  1710.  
  1711. # chatid
  1712. @ubot.on_message(filters.user("self") & filters.command("chatid", "."))
  1713. async def chatid(client, message):
  1714. if message.reply_to_message:
  1715. try:
  1716. await message.edit(
  1717. f"**📱Chatid: {message.reply_to_message.chat.first_name}: {message.reply_to_message.chat.id}**")
  1718. except:
  1719. await message.edit("**❌ Non è un utente/canale ❌**")
  1720. else:
  1721. try:
  1722. p = message.text.split(" ")[1]
  1723. ut = await client.get_chat(p)
  1724. await message.edit(f"**📱Chatid Di: {ut.title}: {ut.id}**")
  1725. except:
  1726. await message.edit(f"**📱Chatid: {message.chat.id}**")
  1727.  
  1728.  
  1729. # fakeID
  1730. faker = Faker('it')
  1731.  
  1732.  
  1733. @ubot.on_message(filters.user("self") & filters.command("fakeidentity", "."))
  1734. async def fakeid(client, message):
  1735. await message.edit(f"""
  1736. Name: {faker.name()}
  1737.  
  1738. Address: {faker.address()}
  1739.  
  1740. Job: {faker.job()}
  1741.  
  1742. Phone number: {faker.phone_number()}
  1743. """)
  1744.  
  1745.  
  1746. # fakemail
  1747. def random_char(char_num):
  1748. return ''.join(random.choice(string.ascii_letters) for _ in range(char_num))
  1749.  
  1750.  
  1751. @ubot.on_message(filters.user("self") & filters.command("fakemail", "."))
  1752. async def fakemail(client, message):
  1753. await message.edit(random_char(12) + "@gmail.com")
  1754.  
  1755.  
  1756. # percentuale
  1757. @ubot.on_message(filters.user("self") & filters.command("percentuale", "."))
  1758. async def fakemail(client, message):
  1759. await message.edit((int(message.command[2]) * int(message.command[1])) / 100)
  1760.  
  1761.  
  1762. # checkvoip
  1763. @ubot.on_message(filters.user("self") & filters.command("checkvoip", "."))
  1764. async def checkvoip(client, message):
  1765. if message.reply_to_message:
  1766. checker = await client.get_users(message.reply_to_message.from_user.id)
  1767. try:
  1768. if checker.dc_id == 4:
  1769. await message.edit(f"**✅ » {checker.mention} non è un voip\n\n📡 » DataCenter {checker.dc_id}**")
  1770. else:
  1771. await message.edit(f"**❌ » {checker.mention} è un voip\n\n📡 » DataCenter {checker.dc_id}**")
  1772. except:
  1773. await message.edit("**🥺 L'utente non ha una pic quindi non posso controllare il dc**")
  1774. else:
  1775. checker = await client.get_users(message.text.split(" ")[1])
  1776. try:
  1777. if checker.dc_id == 4:
  1778. await message.edit(f"**✅ » {checker.mention} non è un voip\n\n📡 » DataCenter {checker.dc_id}**")
  1779. else:
  1780. await message.edit(
  1781. f"**❌ » {checker.mention} risulta essere un voip\n\n📡 » DataCenter {checker.dc_id}**")
  1782. except:
  1783. await message.edit("**🥺 L'utente non ha una pic quindi non posso controllare il dc**")
  1784.  
  1785.  
  1786. # cloud
  1787. @ubot.on_message(filters.user("self") & filters.command("cloud", "."))
  1788. async def cloud(client, message):
  1789. if message.reply_to_message:
  1790. await message.reply_to_message.forward("me")
  1791. await message.edit("Fatto !")
  1792. else:
  1793. await message.edit("Comando da usare in reply !")
  1794.  
  1795.  
  1796. # expiry
  1797. @ubot.on_message(filters.user("self") & filters.command("expiry", "."))
  1798. async def cloud(client, message):
  1799. await message.edit(f"""
  1800. 📊 Informazioni userbot
  1801.  
  1802. • Personalizzato
  1803. ➥📆 Data di acquisto ➯ {data_acquisto}
  1804. ➥⏱ Scadenza il ➯ {data}
  1805. """)
  1806.  
  1807.  
  1808. # netban
  1809. @ubot.on_message(filters.user("self") & filters.command("fnetban", "."))
  1810. async def netban(client, message):
  1811. await message.delete()
  1812. scammer = message.text.split(" ")[1]
  1813. motivo = message.text.replace(f".fnetban {scammer}", "")
  1814. a = await client.get_users(scammer)
  1815. await client.send_message(message.chat.id,
  1816. f"""⚠️UTENTE NETBANNATO⚠️
  1817.  
  1818. Informazioni sull'utente 🕵🏼️‍♂️
  1819. ✏️ Nome » {a.first_name}
  1820. 🆔 ID » {a.id}
  1821. 🎟 Username » @{a.username}
  1822.  
  1823. 👮🏼‍♂️Admin:
  1824. 🆔 ID » {message.from_user.id}
  1825. ✏️ Nome » {message.from_user.first_name}
  1826. 🎟 Username » @{message.from_user.username}
  1827.  
  1828. 📑 Motivazione: {motivo}
  1829.  
  1830. 📂 Prove » <a href='https://telegra.ph/COGLIONE-08-11'>Clicca qui</a>
  1831. """, disable_web_page_preview=True)
  1832.  
  1833.  
  1834. # stats
  1835. @ubot.on_message(filters.user("self") & filters.command("stats", "."))
  1836. async def stats(client, message):
  1837. await message.edit("<code>🔄 Caricamento</code>")
  1838. private, gruppi, canali, sg, bots = 0, 0, 0, 0, 0
  1839. async for dialog in client.get_dialogs():
  1840. if dialog.chat.type == ChatType.PRIVATE:
  1841. private += 1
  1842. elif dialog.chat.type == ChatType.BOT:
  1843. bots += 1
  1844. elif dialog.chat.type == ChatType.GROUP:
  1845. gruppi += 1
  1846. elif dialog.chat.type == ChatType.SUPERGROUP:
  1847. sg += 1
  1848. elif dialog.chat.type == ChatType.CHANNEL:
  1849. canali += 1
  1850. await asyncio.sleep(0.02)
  1851. await message.edit(
  1852. f"**📊Statistiche:**\n\n**__👤 Chat Private: {private}\n🔷 Gruppi Privati: {gruppi}\n👥 Super Gruppi: {sg}\n📣 Canali: {canali}\n🤖 Bot: {bots}__**")
  1853.  
  1854.  
  1855. # status
  1856.  
  1857. @ubot.on_message(filters.user("self") & filters.command("status", "."))
  1858. async def status(client, message):
  1859. await message.edit(f"**✅UserBot Online✅**")
  1860.  
  1861.  
  1862. # filtri
  1863. @ubot.on_message(filters.user("self") & filters.command("ignore", ".") & filters.private)
  1864. async def ignore(client, message):
  1865. global ignore
  1866. if message.chat.id in ignore:
  1867. await message.edit("❌Utente già ignorato❌")
  1868. else:
  1869. ignore.append(message.chat.id)
  1870. await message.edit("❌Utente ignorato❌")
  1871.  
  1872. # animati
  1873. @ubot.on_message(filters.user("self") & filters.command("unignore", ".") & filters.private)
  1874. def uningnore(client, message):
  1875. global ignore
  1876. if message.chat.id in ignore:
  1877. ignore.remove(message.chat.id)
  1878. message.edit("✅Utente Unignorato✅")
  1879. else:
  1880. message.edit("✅L'utente non è ignorato✅")
  1881.  
  1882. @ubot.on_message(filters.user("self") & filters.command("addfiltromedia", "."))
  1883. async def setRasdaseply(client, message):
  1884. with open("word.json", "r") as f:
  1885. Commands = json.load(f)
  1886. try:
  1887. p = message.text.split(" ")[1]
  1888. except:
  1889. return await message.edit("No, hai sbagliato!")
  1890. if message.reply_to_message:
  1891. if message.reply_to_message.photo:
  1892. if not p in Commands["media"]:
  1893. await word.add_word_media(p, message.reply_to_message.photo.file_id)
  1894. await message.edit(f"**✅ Filtro {p} Salvato ✅**")
  1895. else:
  1896. await message.edit("**❌ Filtro Già Esistente ❌**")
  1897. else:
  1898. await message.edit("**❌ Filtro non è una foto ❌**")
  1899. else:
  1900. await message.edit("**❌ Devi usare il comando in reply ad una foto ❌**")
  1901.  
  1902. @ubot.on_message(filters.user("self") & filters.command("remfiltromedia", "."))
  1903. async def deasdaslReply(client, message):
  1904. with open("word.json", "r") as f:
  1905. Commands = json.load(f)
  1906. p = message.text.split(" ")[1]
  1907. if p in Commands["media"]:
  1908. del Commands["media"][p]
  1909. with open("word.json", "w+") as f:
  1910. json.dump(Commands, f)
  1911. await message.edit(f"**🗑 Filtro {p} Eliminato 🗑**")
  1912. else:
  1913. await message.edit("**❌ Filtro Inesistente ❌**")
  1914.  
  1915. @ubot.on_message(filters.user("self") & filters.command("addfiltroanimato", "."))
  1916. async def setasdsaReply(client, message):
  1917. with open("word.json", "r") as f:
  1918. Commands = json.load(f)
  1919. p = message.text.split(" ")[1]
  1920. if not p in Commands["animati"]:
  1921. await word.add_word_animate(p, message.text.replace(f".addfiltroanimato {p}", "").split("-|-"))
  1922. await message.edit(f"**✅ Filtro {p} Salvato ✅**")
  1923. else:
  1924. await message.edit("**❌ Filtro Già Esistente ❌**")
  1925.  
  1926.  
  1927. @ubot.on_message(filters.user("self") & filters.command("remfiltroanimato", "."))
  1928. async def delRasdsaeply(client, message):
  1929. with open("word.json", "r") as f:
  1930. Commands = json.load(f)
  1931. p = message.text.split(" ")[1]
  1932. if p in Commands["animati"]:
  1933. del Commands["animati"][p]
  1934. with open("word.json", "w+") as f:
  1935. json.dump(Commands, f)
  1936. await message.edit(f"**🗑 Filtro {p} Eliminato 🗑**")
  1937. else:
  1938. await message.edit("**❌ Filtro Inesistente ❌**")
  1939. ###
  1940.  
  1941. @ubot.on_message(filters.user("self") & filters.command("addfiltro", "."))
  1942. async def setReasdasply(client, message):
  1943. with open("word.json", "r") as f:
  1944. Commands = json.load(f)
  1945. p = message.text.split(" ")[1]
  1946. if not p in Commands["word"]:
  1947. await word.add_word(p, message.text.replace(f".addfiltro {p}", ""))
  1948. await message.edit(f"**✅ Filtro {p} Salvato ✅**")
  1949. else:
  1950. await message.edit("**❌ Filtro Già Esistente ❌**")
  1951.  
  1952.  
  1953. @ubot.on_message(filters.user("self") & filters.command("remfiltro", "."))
  1954. async def delRepasdly(client, message):
  1955. with open("word.json", "r") as f:
  1956. Commands = json.load(f)
  1957. p = message.text.split(" ")[1]
  1958. if p in Commands["word"]:
  1959. del Commands["word"][p]
  1960. with open("word.json", "w+") as f:
  1961. json.dump(Commands, f)
  1962. await message.edit(f"**🗑 Filtro {p} Eliminato 🗑**")
  1963. else:
  1964. await message.edit("**❌ Filtro Inesistente ❌**")
  1965.  
  1966.  
  1967. @ubot.on_message(filters.user("self") & filters.command("filtri", "."))
  1968. async def repldsadyList(client, message):
  1969. with open("word.json", "r") as f:
  1970. Commands = json.load(f)
  1971. mex = "**👨‍💻 Lista Filtri**\n"
  1972. for i in Commands["word"]:
  1973. mex += f"\n__- {i}__"
  1974. await message.edit(mex)
  1975.  
  1976.  
  1977. @ubot.on_message(filters.user("self") & filters.command("addreply", "."))
  1978. async def setRsadaseply(client, message):
  1979. with open("word.json", "r") as f:
  1980. Commands = json.load(f)
  1981. p = message.text.split(" ")[1]
  1982. if not p in Commands["wordr"]:
  1983. await word.add_wordr(p, message.text.replace(f".addreply {p}", ""))
  1984. await message.edit(f"**✅ Reply {p} Salvato ✅**")
  1985. else:
  1986. await message.edit("**❌ Reply Già Esistente ❌**")
  1987.  
  1988.  
  1989. @ubot.on_message(filters.user("self") & filters.command("remreply", "."))
  1990. async def delasdReply(client, message):
  1991. with open("word.json", "r") as f:
  1992. Commands = json.load(f)
  1993. p = message.text.split(" ")[1]
  1994. if p in Commands["wordr"]:
  1995. del Commands["wordr"][p]
  1996. with open("word.json", "w+") as f:
  1997. json.dump(Commands, f)
  1998. await message.edit(f"**🗑 Reply {p} Eliminato 🗑**")
  1999. else:
  2000. await message.edit("**❌ Reply Inesistente ❌*")
  2001.  
  2002.  
  2003. @ubot.on_message(filters.user("self") & filters.command("replylist", "."))
  2004. async def replyLisadfst(client, message):
  2005. with open("word.json", "r") as f:
  2006. Commandss = json.load(f)
  2007. mex = "**Lista Reply**\n"
  2008. for i in Commandss["wordr"]:
  2009. mex += f"\n__- {i}__"
  2010. await message.edit(mex)
  2011.  
  2012. @ubot.on_message(filters.user("self") & filters.command("listanimati", "."))
  2013. async def replyLigfdgst(client, message):
  2014. with open("word.json", "r") as f:
  2015. Commandss = json.load(f)
  2016. mex = "**Lista Animati**\n"
  2017. for i in Commandss["animati"]:
  2018. mex += f"\n__- {i}__"
  2019. await message.edit(mex)
  2020.  
  2021. @ubot.on_message(filters.user("self") & filters.command("listamedia", "."))
  2022. async def repldffsdfsdyList(client, message):
  2023. with open("word.json", "r") as f:
  2024. Commandss = json.load(f)
  2025. mex = "**Lista Media**\n"
  2026. for i in Commandss["media"]:
  2027. mex += f"\n__- {i}__"
  2028. await message.edit(mex)
  2029.  
  2030. @ubot.on_message(filters.text & filters.user("self"))
  2031. async def Reply(client, message):
  2032. update = json.load(open("word.json"))
  2033. if message.text in update["word"].keys():
  2034. reply = update["word"][f"{message.text}"]
  2035. await message.edit(f"{reply}", disable_web_page_preview=True)
  2036. elif message.text in update["animati"].keys():
  2037. for a in update["animati"][message.text]:
  2038. await message.edit(a)
  2039. time.sleep(1.2)
  2040. elif message.text in update["media"].keys():
  2041. from pyrogram.types import InputMedia, InputMediaPhoto
  2042. await message.delete()
  2043. await ubot.send_photo(message.chat.id, update["media"][message.text])
  2044. elif message.text in update["wordr"].keys() and message.chat.id not in ignore:
  2045. reply = update["wordr"][f"{message.text}"]
  2046. await message.reply(f"{reply}", disable_web_page_preview=True)
  2047.  
  2048.  
  2049. # reply
  2050.  
  2051. idle()
Add Comment
Please, Sign In to add comment